service/vendor/github.com/go-basic/ipv4
Leufolium 75b8d47ba9 by Robin at 20240117; xxl-job 2024-01-17 19:52:54 +08:00
..
README.md by Robin at 20240117; xxl-job 2024-01-17 19:52:54 +08:00
ip.go by Robin at 20240117; xxl-job 2024-01-17 19:52:54 +08:00

README.md

Installation

go get github.com/go-basic/ipv4

Example

package main

import (
	"fmt"
	"github.com/go-basic/ipv4"
)

func main() {
	ip := ipv4.LocalIP()
	fmt.Println(ip)
	ips, _ := ipv4.LocalIPv4s()
	fmt.Println(ips)
}