utils

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EncodeMap  [256]byte
	DONTESCAPE byte = 255
)

Functions

func BigCamelCase

func BigCamelCase(s string) string

func Contains

func Contains[T any](lst []T, fn func(T) bool) bool

func Each

func Each[T any](lst []T, fn func(int, T) bool)

func Escape

func Escape(sql string) string

Escape only support utf-8

func LowerCase

func LowerCase(s string) string

func Must

func Must[T any](v T, err error) T
func Search[T any](lst []T, fn func(T) bool) (result []T)

func SmallCamelCase

func SmallCamelCase(s string) string

func ToMap

func ToMap(v any, excludes ...string) map[string]any

func ValueOrZero

func ValueOrZero(v any, typ reflect.Type) reflect.Value

Types

This section is empty.

Jump to

Keyboard shortcuts

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