Source file
src/go/constant/kind_string.go
1
2
3 package constant
4
5 import "strconv"
6
7 func _() {
8
9
10 var x [1]struct{}
11 _ = x[Unknown-0]
12 _ = x[Bool-1]
13 _ = x[String-2]
14 _ = x[Int-3]
15 _ = x[Float-4]
16 _ = x[Complex-5]
17 }
18
19 const _Kind_name = "UnknownBoolStringIntFloatComplex"
20
21 var _Kind_index = [...]uint8{0, 7, 11, 17, 20, 25, 32}
22
23 func (i Kind) String() string {
24 if i < 0 || i >= Kind(len(_Kind_index)-1) {
25 return "Kind(" + strconv.FormatInt(int64(i), 10) + ")"
26 }
27 return _Kind_name[_Kind_index[i]:_Kind_index[i+1]]
28 }
29
View as plain text