utils

package
v0.0.0-...-c9cb8e9 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIpFromGin

func GetIpFromGin(ctx *gin.Context) (ip string)

GetIpFromGin get ip from gin request context

func GetIpFromGrpc

func GetIpFromGrpc(ctx context.Context) (ip string)

GetIpFromGrpc get ip from grpc request context

func TruncateFile

func TruncateFile(file *os.File, startOffset int64) error

TruncateFile truncate file,discard [0,startOffset), and keep [startOffset,)

Types

This section is empty.

Jump to

Keyboard shortcuts

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