Documentation ¶
Index ¶
- Constants
- Variables
- func Display()
- func Iif[T any](condition bool, ifFunc, elseFunc T) T
- func IifF[T any](condition bool, ifFunc, elseFunc func() T) T
- func ReadJSONFile(path string, out any) (err error)
- func ReadYAMLFile[T any](path string, out *T) (err error)
- func Select[T comparable](values ...T) (out T)
- func SetWorkSpace(ws string)
- func UnmarshalYAMLString[T any](data string, out *T) (err error)
- func WorkSpace(names ...string) string
- func WriteJSONFile(path string, in any) (err error)
- func WriteYAMLFile(path string, in any) (err error)
- type Type
- type Value
Constants ¶
Variables ¶
View Source
var ( Description = "网站服务" Version = "<unknown>" BuildTime = "<unknown>" BuildHash = "<unknown>" BuildTag = "<unknown>" )
Functions ¶
func Select ¶
func Select[T comparable](values ...T) (out T)
Select returns the first non-zero arguments. Arguments must be comparable.
func SetWorkSpace ¶
func SetWorkSpace(ws string)
func UnmarshalYAMLString ¶
UnmarshalYAMLString 从字符串中解析配置
Types ¶
type Value ¶
func YamlFileToJSON ¶
YamlFileToJSON read yaml file, unmarshal it and convert to gjson value
Click to show internal directories.
Click to hide internal directories.