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.
852 B
852 B
Golang Ip
📦 Golang Ip库
安装
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())
}