You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gojobs/vendor/go.dtapp.net/goip
李光春 1d5d63b0de
- update mongo
2 years ago
..
geoip - update mongo 2 years ago
ip2region - update mongo 2 years ago
ip2region_v2 - update mongo 2 years ago
ipv6wry - update mongo 2 years ago
qqwry - update mongo 2 years ago
.drone.yml - update model 2 years ago
.gitignore - update mongo 2 years ago
LICENSE - update model 2 years ago
README.md - update model 2 years ago
analyse.go - update mongo 2 years ago
client.go - update mongo 2 years ago
const.go - update mongo 2 years ago
ip.go - update mongo 2 years ago
is.go - update mongo 2 years ago
query.go - update mongo 2 years ago

README.md

Golang Ip

📦 Golang Ip

godoc goproxy.cn goreportcard.com deps.dev

安装

go get -v -u go.dtapp.net/goip

使用

package main

import (
	"context"
	"go.dtapp.net/goip"
	"testing"
)

func TestGoIp(t *testing.T) {
	// 获取Mac地址
	t.Log(goip.GetMacAddr(context.Background()))
	// 内网ip
	t.Log(goip.GetInsideIp(context.Background()))
	// 外网ip
	t.Log(goip.GetOutsideIp(context.Background()))
}