utils

package
v0.1.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CamelToSnake

func CamelToSnake(s string) string

驼峰字符串转蛇形字符串, XxYy to xx-yy , XxYY to xx-yy

func ContainsString

func ContainsString(ss []string, s string) bool

切片字符串ss是否包含元素s

func FuncWithTrue

func FuncWithTrue(flag bool, f func())

func GetDefString

func GetDefString(val string, defs ...string) string

func GetDefStringWithBool

func GetDefStringWithBool(b bool, val string, defs ...string) string

func GetEnv

func GetEnv(key string, def string) string

func RemoveSliceStringEmptyElement

func RemoveSliceStringEmptyElement(src []string) (res []string)

func SnakeToCamel

func SnakeToCamel(s string) string

蛇形字符串转驼峰字符串 xx_yy to XxYy

func Struct2Map

func Struct2Map(obj interface{}, keyGen func(name string) string) map[string]interface{}

func Struct2MapLowerKey

func Struct2MapLowerKey(obj interface{}) map[string]interface{}

Types

This section is empty.

Jump to

Keyboard shortcuts

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