Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsContains ¶
func IsContains(container, item interface{}) bool
IsContains 判断 container 是否包含了 item 的内容。若是指针,会判断指针指向的内容, 但是不支持多重指针。
若 container 是字符串(string、[]byte和[]rune,不包含 fmt.Stringer 接口), 都将会以字符串的形式判断其是否包含 item。 若 container是个列表(array、slice、map)则判断其元素中是否包含 item 中的 的所有项,或是 item 本身就是 container 中的一个元素。
func IsEmpty ¶
func IsEmpty(expr interface{}) bool
IsEmpty 判断一个值是否为空(0, "", false, 空数组等)。 []string{""}空数组里套一个空字符串,不会被判断为空。
func IsEqual ¶
func IsEqual(v1, v2 interface{}) bool
IsEqual 判断两个值是否相等。
除了通过 reflect.DeepEqual() 判断值是否相等之外,一些类似 可转换的数值也能正确判断,比如以下值也将会被判断为相等:
int8(5) == int(5) []int{1,2} == []int8{1,2} []int{1,2} == [2]int8{1,2} []int{1,2} == []float32{1,2} map[string]int{"1":"2":2} == map[string]int8{"1":1,"2":2} // map的键值不同,即使可相互转换也判断不相等。 map[int]int{1:1,2:2} != map[int8]int{1:1,2:2}
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
decimal
Package decimal provides a high-performance, arbitrary precision, floating-point decimal library.
|
Package decimal provides a high-performance, arbitrary precision, floating-point decimal library. |
decimal/internal/arith
Package arith provides performance-sensitive arithmetic operations.
|
Package arith provides performance-sensitive arithmetic operations. |
decimal/internal/c
Package c provides internal constants.
|
Package c provides internal constants. |
decimal/math
Package math implements various useful mathematical functions and constants.
|
Package math implements various useful mathematical functions and constants. |
decimal/misc
Package misc contains miscellaneous decimal routes.
|
Package misc contains miscellaneous decimal routes. |
decimal/suite
Package suite provides a simple API for parsing and using IBM Labs' "Floating-Point Test-Suite for IEEE" This package is deprecated and will be removed in the next major version.
|
Package suite provides a simple API for parsing and using IBM Labs' "Floating-Point Test-Suite for IEEE" This package is deprecated and will be removed in the next major version. |
* Author: YoungChan * Date: 2020-07-22 17:23:08 * LastEditors: YoungChan * LastEditTime: 2020-09-02 18:27:43 * Description: file content
|
* Author: YoungChan * Date: 2020-07-22 17:23:08 * LastEditors: YoungChan * LastEditTime: 2020-09-02 18:27:43 * Description: file content |
Package network Author: youngchan CreateDate: 2021/5/7 3:30 下午 Copyright: ©2021 NEW CORE Technology Co.
|
Package network Author: youngchan CreateDate: 2021/5/7 3:30 下午 Copyright: ©2021 NEW CORE Technology Co. |
Click to show internal directories.
Click to hide internal directories.