File tree 2 files changed +4
-8
lines changed
2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change 1
1
package jsonpointer
2
2
3
- import (
4
- "reflect"
5
- )
6
-
7
3
type pointerError string
8
4
9
5
func (e pointerError ) Error () string {
10
6
return string (e )
11
7
}
12
8
13
- var jsonPointableType = reflect .TypeOf (new (JSONPointable )).Elem ()
14
- var jsonSetableType = reflect .TypeOf (new (JSONSetable )).Elem ()
15
-
16
9
const (
17
10
// ErrPointer is an error raised by the jsonpointer package
18
11
ErrPointer pointerError = "JSON pointer error"
19
12
20
- // ErrInvalidStart states that a JSON pointer must start with a separator
13
+ // ErrInvalidStart states that a JSON pointer must start with a separator ("/")
21
14
ErrInvalidStart pointerError = `JSON pointer must be empty or start with a "` + pointerSeparator
22
15
23
16
// ErrUnsupportedValueType indicates that a value of the wrong type is being set
Original file line number Diff line number Diff line change @@ -41,6 +41,9 @@ const (
41
41
pointerSeparator = `/`
42
42
)
43
43
44
+ var jsonPointableType = reflect .TypeOf (new (JSONPointable )).Elem ()
45
+ var jsonSetableType = reflect .TypeOf (new (JSONSetable )).Elem ()
46
+
44
47
// JSONPointable is an interface for structs to implement when they need to customize the
45
48
// json pointer process
46
49
type JSONPointable interface {
You can’t perform that action at this time.
0 commit comments