forked from apaxa-go/helper
/
make-gen.go
executable file
·72 lines (57 loc) · 1.65 KB
/
make-gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
//replacer:generated-file
package constanth
import (
"go/constant"
)
// MakeUint returns the Int value for x.
func MakeUint(x uint) constant.Value {
return constant.MakeUint64(uint64(x))
}
// MakeUint8 returns the Int value for x.
func MakeUint8(x uint8) constant.Value {
return constant.MakeUint64(uint64(x))
}
// MakeUint16 returns the Int value for x.
func MakeUint16(x uint16) constant.Value {
return constant.MakeUint64(uint64(x))
}
// MakeUint64 returns the Int value for x.
func MakeUint64(x uint64) constant.Value {
return constant.MakeUint64(uint64(x))
}
// MakeInt returns the Int value for x.
func MakeInt(x int) constant.Value {
return constant.MakeInt64(int64(x))
}
// MakeInt8 returns the Int value for x.
func MakeInt8(x int8) constant.Value {
return constant.MakeInt64(int64(x))
}
// MakeInt16 returns the Int value for x.
func MakeInt16(x int16) constant.Value {
return constant.MakeInt64(int64(x))
}
// MakeInt32 returns the Int value for x.
func MakeInt32(x int32) constant.Value {
return constant.MakeInt64(int64(x))
}
// MakeInt64 returns the Int value for x.
func MakeInt64(x int64) constant.Value {
return constant.MakeInt64(int64(x))
}
// MakeFloat32 returns the Int value for x.
func MakeFloat32(x float32) constant.Value {
return constant.MakeFloat64(float64(x))
}
// MakeFloat64 returns the Int value for x.
func MakeFloat64(x float64) constant.Value {
return constant.MakeFloat64(float64(x))
}
// MakeBool returns the Int value for x.
func MakeBool(x bool) constant.Value {
return constant.MakeBool(bool(x))
}
// MakeString returns the Int value for x.
func MakeString(x string) constant.Value {
return constant.MakeString(string(x))
}