-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvector_dot.go
More file actions
48 lines (38 loc) · 1.43 KB
/
vector_dot.go
File metadata and controls
48 lines (38 loc) · 1.43 KB
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
package vector
// Shorthands for vector.Get*PS() methods with "." used as separator.
// Dot looks and get node by given path and "." separator.
func (vec *Vector) Dot(path string) *Node {
return vec.GetPS(path, ".")
}
// DotObject looks and get object by given path and "." separator.
func (vec *Vector) DotObject(path string) *Node {
return vec.GetObjectPS(path, ".")
}
// DotArray looks and get array by given path and "." separator.
func (vec *Vector) DotArray(path string) *Node {
return vec.GetArrayPS(path, ".")
}
// DotBytes looks and get bytes by given path and "." separator.
func (vec *Vector) DotBytes(path string) []byte {
return vec.GetBytesPS(path, ".")
}
// DotString looks and get string by given path and "." separator.
func (vec *Vector) DotString(path string) string {
return vec.GetStringPS(path, ".")
}
// DotBool looks and get bool by given path and "." separator.
func (vec *Vector) DotBool(path string) bool {
return vec.GetBoolPS(path, ".")
}
// DotFloat looks and get float by given path and "." separator.
func (vec *Vector) DotFloat(path string) (float64, error) {
return vec.GetFloatPS(path, ".")
}
// DotInt looks and get integer by given path and "." separator.
func (vec *Vector) DotInt(path string) (int64, error) {
return vec.GetIntPS(path, ".")
}
// DotUint looks and get unsigned integer by given path and "." separator.
func (vec *Vector) DotUint(path string) (uint64, error) {
return vec.GetUintPS(path, ".")
}