Documentation
¶
Index ¶
- Constants
- Variables
- func Coalesce[T comparable](values ...T) (out T)
- func Display()
- func IifF[T any](condition bool, ifFunc func() T, elseFunc func() T) T
- func IsDebug() bool
- func ReadJSONFile(path string, out any) (err error)
- func ReadYAMLFile[T any](path string, out *T) (err error)
- func SetDebug(d bool)
- func SetWorkSpace(ws string) error
- 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 Coalesce ¶ added in v1.0.0
func Coalesce[T comparable](values ...T) (out T)
Coalesce returns the first non-zero arguments. Arguments must be comparable.
func SetWorkSpace ¶
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.