Documentation
¶
Index ¶
- func BatchSlice[K any](size int, result []K) <-chan []K
- func Between(data string, keys ...string) string
- func ByteSliceToString(b []byte) string
- func CRC32(field string) uint32
- func GetShortID() ([]byte, error)
- func GetTinyID() ([]byte, error)
- func GetUniqueID() string
- func HashName(name string) string
- func MaskField(str string, keepUnmaskedFront int, keepUnmaskedEnd int) string
- func RandStringBytes(n int) string
- func SafeGet[T any](ptr *T, defaultValue T) T
- func SplitByChunks(s string, chunkSize int) []string
- type ContextKey
- type Password
- type Str
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchSlice ¶
func ByteSliceToString ¶
ByteSliceToString cast given bytes to string, without allocation memory
func RandStringBytes ¶ added in v1.0.8
func SafeGet ¶
func SafeGet[T any](ptr *T, defaultValue T) T
SafeGet return value of pointer, and return default value if it nil
func SplitByChunks ¶
Types ¶
type Password ¶
type Password string
Password describe masked field
func (Password) MarshalJSON ¶
MarshalJSON block to show value in json
Click to show internal directories.
Click to hide internal directories.