(s *state)
| 16 | } |
| 17 | |
| 18 | func stateKey(s *state) string { |
| 19 | k := "" |
| 20 | if s.parentState != nil { |
| 21 | k = stateKey(s.parentState) |
| 22 | } |
| 23 | if s.isObject { |
| 24 | return fmt.Sprintf("%s.%s", k, s.objectKey) |
| 25 | } else if s.isArray { |
| 26 | return fmt.Sprintf("%s.[%d]", k, s.arrayIndex) |
| 27 | } else { |
| 28 | return k |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | func JSONPath(out io.Writer, src io.Reader, colorize bool) (hasNextPage bool, endCursor string) { |
| 33 | dec := json.NewDecoder(src) |
no outgoing calls
no test coverage detected
searching dependent graphs…