File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change 11package jsonpointer
22
3- import (
4- "reflect"
5- )
6-
73type pointerError string
84
95func (e pointerError ) Error () string {
106 return string (e )
117}
128
13- var jsonPointableType = reflect .TypeOf (new (JSONPointable )).Elem ()
14- var jsonSetableType = reflect .TypeOf (new (JSONSetable )).Elem ()
15-
169const (
1710 // ErrPointer is an error raised by the jsonpointer package
1811 ErrPointer pointerError = "JSON pointer error"
1912
20- // ErrInvalidStart states that a JSON pointer must start with a separator
13+ // ErrInvalidStart states that a JSON pointer must start with a separator ("/")
2114 ErrInvalidStart pointerError = `JSON pointer must be empty or start with a "` + pointerSeparator
2215
2316 // 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 (
4141 pointerSeparator = `/`
4242)
4343
44+ var jsonPointableType = reflect .TypeOf (new (JSONPointable )).Elem ()
45+ var jsonSetableType = reflect .TypeOf (new (JSONSetable )).Elem ()
46+
4447// JSONPointable is an interface for structs to implement when they need to customize the
4548// json pointer process
4649type JSONPointable interface {
You can’t perform that action at this time.
0 commit comments