constant

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Space            = " "
	Dot              = "."
	Plus             = "+"
	Comma            = ","
	ChineseComma     = ","
	Semicolon        = ";"
	Colon            = ":"
	Hyphen           = "-"
	Slash            = "/"
	Backslash        = "\\"
	LineBreak        = "\n"
	Underline        = "_"
	WindowsLineBreak = "\r\n"
)
View Source
const (
	StdDateLayout      = "2006-01-02"
	StdTimeLayout      = "2006-01-02 15:04:05"
	StdTimeWithZLayout = "2006-01-02T15:04:05Z"
	StdTimeMSLayout    = "2006-01-02 15:04:05.999999"
)
View Source
const (
	OS   = runtime.GOOS
	Arch = runtime.GOARCH
)
View Source
const (
	DefaultTimezone = "Asia/Shanghai"
)

Variables

View Source
var (
	ErrorType             = reflect.TypeOf((*error)(nil)).Elem()
	ContextType           = reflect.TypeOf((*context.Context)(nil)).Elem()
	GinContextType        = reflect.TypeOf((*gin.Context)(nil))
	AnyType               = reflect.TypeOf((*any)(nil)).Elem()
	AnySliceType          = reflect.TypeOf(([]any)(nil))
	MapStringAnySliceType = reflect.TypeOf(([]map[string]any)(nil))
	IntType               = reflect.TypeOf(int(0))
	IntSliceType          = reflect.TypeOf([]int(nil))
	UintType              = reflect.TypeOf(uint(0))
	UintSliceType         = reflect.TypeOf([]uint(nil))
	StringType            = reflect.TypeOf(string(""))
	StringSliceType       = reflect.TypeOf([]string(nil))
	Float32Type           = reflect.TypeOf(float32(0))
	Float64Type           = reflect.TypeOf(float64(0))
	BoolType              = reflect.TypeOf(bool(false))
)
View Source
var (
	NumberReg    = regexp.MustCompile(`\d+`)
	NonNumberReg = regexp.MustCompile(`\D+`)

	LetterReg    = regexp.MustCompile(`[a-zA-Z]+`)
	NonLetterReg = regexp.MustCompile(`[^a-zA-Z]+`)

	NumberLetterReg    = regexp.MustCompile(`[a-zA-Z0-9]+`)
	NonNumberLetterReg = regexp.MustCompile(`[^a-zA-Z0-9]+`)

	// FlavorNameReg
	//nolint: revive // reg expression issue
	FlavorNameReg = regexp.MustCompile(`(?P<prefix>([scm]|pi|pak|pck|lite|ir)\d+|[lkhf][scm]\d+|p2v(s)?|g\d+(s)?|p8a)\.(?P<middle>small|medium|large|(\d+)*xlarge)\.(?P<suffix>\d+(\.\d)?)`)

	// FullFlavorNameReg
	//nolint: revive // reg expression issue
	FullFlavorNameReg = regexp.MustCompile(`^(?P<prefix>([scm]|pi|pak|pck|lite|ir)\d+|[lkhf][scm]\d+|p2v(s)?|g\d+(s)?|p8a)\.(?P<middle>small|medium|large|(\d+)*xlarge)\.(?P<suffix>\d+(\.\d)?)$`)
)
View Source
var (
	GoVersion = runtime.Version()
)

Functions

func DefaultLocation

func DefaultLocation() *time.Location

Types

This section is empty.

Jump to

Keyboard shortcuts

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