utils

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LintGonicMapper = map[string]bool{
	"API":   true,
	"ASCII": true,
	"CPU":   true,
	"CSS":   true,
	"DNS":   true,
	"EOF":   true,
	"GUID":  true,
	"HTML":  true,
	"HTTP":  true,
	"HTTPS": true,
	"ID":    true,
	"IP":    true,
	"JSON":  true,
	"LHS":   true,
	"QPS":   true,
	"RAM":   true,
	"RHS":   true,
	"RPC":   true,
	"SLA":   true,
	"SMTP":  true,
	"SSH":   true,
	"TLS":   true,
	"TTL":   true,
	"UI":    true,
	"UID":   true,
	"UUID":  true,
	"URI":   true,
	"URL":   true,
	"UTF8":  true,
	"VM":    true,
	"XML":   true,
	"XSRF":  true,
	"XSS":   true,
}

Functions

func Add

func Add(y, x int) int

func ContainsString

func ContainsString(collection []string, element string) bool

func CopyFile

func CopyFile(src, dist string) error

func FirstLower

func FirstLower(str string) string

func FirstUpper

func FirstUpper(str string) string

func GetLength added in v1.1.0

func GetLength(slice any) int

GetLength 获取集合类型长度 返回 -1 表示非切片类型

func GonicCase

func GonicCase(str string) string

func IsIDEmpty

func IsIDEmpty(id any) bool

func IsLastIndex

func IsLastIndex(idx int, s any) bool

func LineString

func LineString(str string) string

func SnakeCase

func SnakeCase(str string) string

SnakeCase 下划线命名

func Sub

func Sub(y, x int) int

func TitleCase

func TitleCase(str string) string

func ToString

func ToString(src any) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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