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
李光春 0dc3022014
continuous-integration/drone/push Build is passing Details
- update ip
2 years ago
.circleci update 2 years ago
.github/workflows update 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
.travis.yml update 2 years ago
README.md update 2 years ago
analyse.go init 2 years ago
app.go update ipv4 2 years ago
app_test.go update ipv4 2 years ago
go.mod update ipv4 2 years ago
go.sum update ipv4 2 years ago
ip.go update 2 years ago
ip_test.go update 2 years ago
version.go - update ip 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())
}