utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Camel2Case

func Camel2Case(name string) string

驼峰式写法转为下划线写法

func Case2BigCamel

func Case2BigCamel(name string) string

下划线写法转为大驼峰写法

func Case2SmallCamel

func Case2SmallCamel(name string) string

下划线写法转为小驼峰写法

func Contains

func Contains(list []string, s string) bool

func Find

func Find(list []string, s string) int

func GenwhereToken

func GenwhereToken(columns []string) []string

func GenwhereTokenOfBatch

func GenwhereTokenOfBatch(columns []string, num int) string

func GetSoftDelType

func GetSoftDelType(t reflect.Type) softdelete.SoftDelType

GetSoftDelType 获取一个 struct 的 type 的软删除类型

func IsSoftDelFieldType

func IsSoftDelFieldType(t reflect.Type) bool

func Lcfirst

func Lcfirst(str string) string

首字母小写

func PanicErr

func PanicErr(err error)

func ToSlice

func ToSlice(v reflect.Value) []any

func ToSliceValue

func ToSliceValue(v reflect.Value) []reflect.Value

func Ucfirst

func Ucfirst(str string) string

首字母大写

Types

type Buffer

type Buffer struct {
	*bytes.Buffer
}

内嵌bytes.Buffer,支持连写

func NewBuffer

func NewBuffer() *Buffer

func (*Buffer) Append

func (b *Buffer) Append(i any) *Buffer

Jump to

Keyboard shortcuts

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