Golang Ip库
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.
Go to file
李光春 360b1ead59
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details
- update v4
2 years ago
ip2region - update 2 years ago
v4 - update v4 2 years ago
v6 - update 2 years ago
.drone.yml - update 2 years ago
.gitignore update 2 years ago
LICENSE - update v4 2 years ago
README.md - update 2 years ago
analyse.go update 2 years ago
go.mod - update v4 2 years ago
go.sum - update v4 2 years ago
goip.go - update 2 years ago
goip_test.go - update 2 years ago
ip.go - update 2 years ago
ip_test.go - update 2 years ago
version.go - update v4 2 years ago
version_test.go - update 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 (
	"go.dtapp.net/goip"
	"testing"
)

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