utils

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddLocalIpv4

func AddLocalIpv4(addr string) string

func GetClientIP added in v0.0.5

func GetClientIP(c *app.RequestContext) string

GetClientIP 从 hertz 的 RequestContext 获取客户端 IP 地址 优先检查 X-Forwarded-For、X-Real-IP 等代理头,最后使用 RemoteAddr

func GetLocalIPv4

func GetLocalIPv4() (string, error)

func MustGetLocalIPv4

func MustGetLocalIPv4() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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