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-library/vendor/go.dtapp.net/goip
李光春 77a1a786ec
- ip:更新
2 years ago
..
ip2region - ip:更新 2 years ago
v4 - ip:更新 2 years ago
v6 - ip:更新 2 years ago
.drone.yml - ip:更新 2 years ago
.gitignore - ip:更新 2 years ago
README.md - ip:更新 2 years ago
analyse.go - ip:更新 2 years ago
goip.go - ip:更新 2 years ago
ip.go - ip:更新 2 years ago
version.go - 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())
}