package
0.0.7
Repository: https://github.com/x-module/helper.git
Documentation: pkg.go.dev

# README

13. netutil 网络包支持获取 ip 地址,发送 http 请求。

import "github.com/x-module/helper/netutil"

函数列表:

  • ConvertMapToQueryString : 将map转换成http查询字符串。
  • EncodeUrl : 编码url query string的值(?a=1&b=[2] -> ?a=1&b=%5B2%5D)。
  • GetInternalIp : 获取内部ipv4。
  • GetIps : 获取系统ipv4地址列表。
  • GetMacAddrs : 获取系统mac地址列。
  • GetPublicIpInfo : 获取公网ip信息.
  • GetRequestPublicIp : 获取http请求ip。
  • IsPublicIP : 判断ip是否是公共ip。
  • IsInternalIP : 判断ip是否是局域网ip。
  • StructToUrlValues : 将结构体转为url values, 仅转化结构体导出字段并且包含json tag。
  • RequestUtils : 网络请求相关库。

# Functions

ConvertMapToQueryString 转换map数据为请求参数.
EncodeUrl 编码url.
GetInternalIp 获取内网IP.
GetIps 获取系统全部ipv4.
GetMacAddress 获取系统mac地址.
GetPublicIpInfo 获取公网IP信息.
GetRequestPublicIp 获取请求的公网IP.
IsInternalIP 验证IP是否是内网IP.

# Structs

No description provided by the author