utils

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RequestIDKey requestID key
	RequestIDKey = "x-request-id"
	// UsernameKey username key
	UsernameKey = "x-username"
)

Variables

View Source
var Cols = []string{"", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}

Functions

func ConvertNumToChars

func ConvertNumToChars(num int) (string, error)

func GetHeaderFirst

func GetHeaderFirst(ctx context.Context, key string) string

GetHeaderFirst get header first value

func GetRequestID

func GetRequestID(ctx context.Context) string

GetRequestID request id from header

func GetUsername

func GetUsername(ctx context.Context) string

GetUsername get username from header

func NewRequestID

func NewRequestID() string

NewRequestID generate a RequestId

func WriteXlsx

func WriteXlsx(sheet string, records interface{}) *excelize.File

WriteXlsx 填充excel

Types

This section is empty.

Jump to

Keyboard shortcuts

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