-
Notifications
You must be signed in to change notification settings - Fork 4
/
constants.go
38 lines (33 loc) · 1.22 KB
/
constants.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
package ldvalue
// string literals should be defined here if they are referenced in multiple files
const (
trueString = "true"
falseString = "false"
nullAsJSON = "null"
noneDescription = "[none]"
)
var (
nullAsJSONBytes = []byte("null") //nolint:gochecknoglobals
trueBytes = []byte("true") //nolint:gochecknoglobals
falseBytes = []byte("false") //nolint:gochecknoglobals
)
// ValueType is defined in value_base.go
const (
// NullType describes a null value. Note that the zero value of ValueType is NullType, so the
// zero of Value is a null value.
NullType ValueType = iota
// BoolType describes a boolean value.
BoolType ValueType = iota
// NumberType describes a numeric value. JSON does not have separate types for int and float, but
// you can convert to either.
NumberType ValueType = iota
// StringType describes a string value.
StringType ValueType = iota
// ArrayType describes an array value.
ArrayType ValueType = iota
// ObjectType describes an object (a.k.a. map).
ObjectType ValueType = iota
// RawType describes a json.RawMessage value. This value will not be parsed or interpreted as
// any other data type, and can be accessed only by calling AsRaw().
RawType ValueType = iota
)