Documentation ¶
Index ¶
- Constants
- func CamelToSnakeCase(input string) string
- func CreateDir(dir string) error
- func FileExists(filepath string) bool
- func FirstLetterToLower(s string) string
- func FirstLetterToUpper(s string) string
- func GetFileExtension(name string) string
- func LinkedListToArray(l *list.List, dest any) error
- func PathExists(path string) (bool, error)
- func ReplaceIdToID(str string) string
- func SliceDiff[T comparable](a, b []T) []T
- func SliceDuplicate[T comparable](s []T) []T
- func SnakeToLowerCamel(s string) string
- func SnakeToPascal(s string) string
- func TimeFormat(t time.Time, format string) string
- func ToJsonString(v any) string
- func Trim(str string) string
- func TrimFileExtension(name string) string
- func VToUint64(v any) uint64
- type TreeNode
- type TreeNodeData
Constants ¶
View Source
const ( YYYY_MM_DD_HH_MM_SS = "2006-01-02 15:04:05" YYYY_MM_DD = "2006-01-02" MM_DD = "01-02" YYYYMMDD = "20060102" MMDD = "0102" )
Variables ¶
This section is empty.
Functions ¶
func CamelToSnakeCase ¶ added in v1.2.4
CamelToSnakeCase 将驼峰命名转换为蛇形
func FirstLetterToLower ¶ added in v1.2.0
func GetFileExtension ¶ added in v1.2.0
GetFileExtension 获取文件扩展名
func PathExists ¶
func ReplaceIdToID ¶ added in v1.2.3
ReplaceIdToID 将id、Id、iD替换为Id
func SliceDuplicate ¶
func SliceDuplicate[T comparable](s []T) []T
func SnakeToLowerCamel ¶ added in v1.2.1
SnakeToLowerCamel 蛇形转小驼峰
func ToJsonString ¶ added in v1.2.0
func TrimFileExtension ¶ added in v1.2.0
TrimFileExtension 去除文件扩展名
Types ¶
type TreeNode ¶ added in v1.2.3
type TreeNode struct { ID int // 节点的唯一标识符 ParentID int // 节点的父节点的唯一标识符 TreeNodeData Children []*TreeNode // 节点的子节点 }
TreeNode 结构体表示树的一个节点
type TreeNodeData ¶ added in v1.2.3
type TreeNodeData any
Click to show internal directories.
Click to hide internal directories.