interfacelib

package
v1.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

README

1、类型断言

###(1)语法:   <目标类型的值>,<布尔参数> := <表达式>.( 目标类型 ) // 安全类型断言

  <目标类型的值> := <表达式>.( 目标类型 )  //非安全类型断言

###(2)类型断言的本质:   跟类型转换类似,都是类型之间进行转换,不同之处在于,类型断言实在接口之间进行,相当于Java中,对于一个对象,把一种接口的引用转换成另一种。

Documentation

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL