Documentation ¶
Overview ¶
Package base 基础函数.
Index ¶
Examples ¶
Constants ¶
View Source
const ( Three = 3 Five = 5 Six = 6 Seven = 7 Nine = 9 Ten = 10 Fifteen = 15 TwentyFour = 24 Thirty = 30 Sixty = 60 Hundred = 100 Million = 1e6 HundredMillion = 1e8 Billion = 1e9 )
View Source
const ( One = 1 << iota Two Four Eight Sixteen ThirtyTwo SixtyFour OneHundredTwentyEight TwoHundredFiftySix FiveHundredTwelve Kilo )
Variables ¶
View Source
var None = struct{}{}
nolint: gochecknoglobals
Functions ¶
func Result1 ¶ added in v1.0.4
Result1 返回第1个参数.
Example ¶
package main import ( "fmt" "strconv" "github.com/xuender/kit/base" ) func main() { fmt.Println(base.Result1(1, 2, 3, 4)) fmt.Println(base.Result1(strconv.ParseInt("2", 10, 64))) }
Output: 1 2
func Result2 ¶ added in v1.0.4
Result2 返回第2个参数.
Example ¶
package main import ( "fmt" "os" "github.com/xuender/kit/base" ) func main() { fmt.Println(base.Result2(1, 2, 3, 4)) fmt.Println(os.IsNotExist(base.Result2(os.Stat("not exist")))) }
Output: 2 true
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.