-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvalue.go
More file actions
43 lines (36 loc) · 910 Bytes
/
value.go
File metadata and controls
43 lines (36 loc) · 910 Bytes
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
package types
// Value is a value that has a type.
type Value interface {
Type() string
}
// Stringer is any Value that has a human-readable string representation.
type Stringer interface {
Value
String() string
}
// PropValue is a Value that can be copied.
type PropValue interface {
Value
Copy() PropValue
}
// Aliaser is a Value that has an underlying Value of a different type.
type Aliaser interface {
Value
Alias() Value
}
// Stringlike is any Value that can be converted to a string. Note that this is
// distinct from a Stringer, which returns the value in a human-readable format.
type Stringlike interface {
Value
Stringlike() string
}
// Numberlike is any value that can be converted to a floating-point number.
type Numberlike interface {
Value
Numberlike() float64
}
// Intlike is any value that can be converted to an integer.
type Intlike interface {
Value
Intlike() int64
}