package
Version:
v0.6.10
Opens a new window with list of versions in this module.
Published: Jun 19, 2023
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Net Utils
- provide some network utils. eg:
InternalIPv4
- sub package:
httpctypes - provide some commonly http content types.
httpheader - provide some commonly http header names.
httpreq - provide some http request utils
Install
go get github.com/gookit/goutil/netutil
Go docs
Usage
import "github.com/gookit/goutil/netutil"
// Get internal IPv4 address
netutil.InternalIPv4()
Testings
go test -v ./netutil/...
Test limit by regexp:
go test -v -run ^TestSetByKeys ./netutil/...
Documentation
¶
Package netutil provide some network util functions.
func GetLocalIPs() (ips []string)
GetLocalIPs get local IPs
InternalIP get internal IP
func InternalIPOld() (ip string)
InternalIPOld get internal IP buy old logic
func InternalIPv4() (ip string)
InternalIPv4 get internal IPv4
func InternalIPv6() (ip string)
InternalIPv6 get internal IPv6
Source Files
¶
Directories
¶
Package httpctype list some common http content-type
|
Package httpctype list some common http content-type |
|
|
|
Package httpreq provide an simple http requester and some useful util functions.
|
Package httpreq provide an simple http requester and some useful util functions. |
Click to show internal directories.
Click to hide internal directories.