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
李光春 f16a20abc9
continuous-integration/drone/push Build is passing Details
- 优化
2 years ago
ip2region update ip2region 2 years ago
v4 update ipv4 2 years ago
v6 update 2 years ago
.drone.yml update 2 years ago
.gitignore update 2 years ago
README.md update 2 years ago
analyse.go update 2 years ago
go.mod update ipv4 2 years ago
go.sum update ipv4 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 - 优化 2 years ago

README.md

Golang Ip

📦 Golang Ip库组件

godoc goproxy.cn goreportcard.com deps.dev

安装使用

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

导入

import (
    "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())
}