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.
goip/README.md

899 B

Golang Ip

📦 Golang Ip库

godoc goproxy.cn goreportcard.com deps.dev

安装

go get -v -u github.com/dtapps/goip

使用

package main

import (
	"github.com/dtapps/goip"
	"testing"
)

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