README ¶ 1、类型断言 ###(1)语法: <目标类型的值>,<布尔参数> := <表达式>.( 目标类型 ) // 安全类型断言 <目标类型的值> := <表达式>.( 目标类型 ) //非安全类型断言 ###(2)类型断言的本质: 跟类型转换类似,都是类型之间进行转换,不同之处在于,类型断言实在接口之间进行,相当于Java中,对于一个对象,把一种接口的引用转换成另一种。 Expand ▾ Collapse ▴ Documentation ¶ Index ¶ func StringToFloat64(params interface{}) float64 func StringToInt64(params interface{}) int64 func ToFloat64(params interface{}) (res float64) func ToInt64(params interface{}) (res int64) func ToString(params interface{}) (str string) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func StringToFloat64 ¶ func StringToFloat64(params interface{}) float64 func StringToInt64 ¶ func StringToInt64(params interface{}) int64 func ToFloat64 ¶ func ToFloat64(params interface{}) (res float64) func ToInt64 ¶ func ToInt64(params interface{}) (res int64) func ToString ¶ func ToString(params interface{}) (str string) Types ¶ This section is empty. Source Files ¶ View all Source files interfacelib.go Click to show internal directories. Click to hide internal directories.