MCPcopy
hub / github.com/tidwall/sjson / isOptimisticPath

Function isOptimisticPath

sjson.go:407–420  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

405}
406
407func isOptimisticPath(path string) bool {
408 for i := 0; i < len(path); i++ {
409 if path[i] < '.' || path[i] > 'z' {
410 return false
411 }
412 if path[i] > '9' && path[i] < 'A' {
413 return false
414 }
415 if path[i] > 'z' {
416 return false
417 }
418 }
419 return true
420}
421
422// Set sets a json value for the specified path.
423// A path is in dot syntax, such as "name.last" or "age".

Callers 1

setFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…