commutil

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	XForwardedFor = "X-Forwarded-For"
	XRealIP       = "X-Real-IP"
)

Variables

This section is empty.

Functions

func DecodeBase64

func DecodeBase64(text string) ([]byte, error)

解析base64

func EncodeBase64

func EncodeBase64(data *[]byte) string

生成base64

func GetExternal

func GetExternal() (string, error)

获取本机公网ip

func GetInternal

func GetInternal() (string, error)

获取本机内网ip

func GetMd5

func GetMd5(data *[]byte) string

获取md5

func RemoteIp

func RemoteIp(req *http.Request) string

RemoteIp 返回远程客户端的 IP,如 192.168.1.1

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL