package
Version:
v2.0.11
Opens a new window with list of versions in this module.
Published: Apr 12, 2023
License: Apache-2.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
StringToBool 类型转换: string => bool
PS: 参考了 strconv.ParseBool()、Java hutool中的BooleanUtil.toBoolean().
func ToBool(obj interface{}) bool
ToBool
e.g.
(nil) => false
ToBoolE
e.g.
(nil) => false, nil
func ToBoolWithDefault(src interface{}, def bool) bool
ToString 类型转换: bool => string
e.g.
(true) => "true"
(false) => "false"
Source Files
¶
Click to show internal directories.
Click to hide internal directories.