utils

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRegistrar

func AddRegistrar(f func(*dig.Container))

func BytesToString

func BytesToString(b []byte) string

BytesToString 字节切片转字符串

func ConcatString

func ConcatString(s ...string) string

ConcatString 连接字符串 NOTE: 性能比fmt.Sprintf和+号要好

func ConcatStringBySlash

func ConcatStringBySlash(s ...string) string

ConcatStringBySlash concat string by slash

func DetermineMimeType

func DetermineMimeType(fileName string) string

DetermineMimeType determines the MIME type based on the file extension

func InvokeDI

func InvokeDI(c *dig.Container, function any, opts ...dig.InvokeOption)

func IsEmpty

func IsEmpty(s string) bool

IsEmpty 是否是空字符串

func Register

func Register(di *dig.Container)

func RegisterDI

func RegisterDI(c *dig.Container, constructor any, opts ...dig.ProvideOption)

func StringToBytes

func StringToBytes(s string) []byte

StringToBytes convert string to byte

func StringToInt

func StringToInt(str string) (int, error)

StringToInt 字符串转int

func StringToInt64

func StringToInt64(str string) (int64, error)

StringToInt64 字符串转int64

func StringToUint64

func StringToUint64(str string) (uint64, error)

StringToUint64 字符串转uint64

Types

This section is empty.

Jump to

Keyboard shortcuts

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