Documentation ¶
Overview ¶
Package param provide some util for param parse
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base64DecodeString ¶
Base64DecodeString decode base64 with avx2 see https://github.com/segmentio/asm/issues/50 avoid incorrect unsafe usage in origin library
func EnsureBool ¶
EnsureBool 判断给定的p是否可表示为合法Bool类型,否则返回defaultVal
支持的合法类型有
type bool
type gjson.True or gjson.False
type string "true","yes","1" or "false","no","0" (case insensitive)
func SetAtDefault ¶
func SetAtDefault(variable, value, defaultValue interface{})
SetAtDefault 在变量 variable 为默认值 defaultValue 的时候修改为 value
func SetExcludeDefault ¶
func SetExcludeDefault(variable, value, defaultValue interface{})
SetExcludeDefault 在目标值 value 不为默认值 defaultValue 时修改 variable 为 value
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.