MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / HasContainerLeaf

Method HasContainerLeaf

pkg/util/json/json.go:2903–2917  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2901}
2902
2903func (j jsonArray) HasContainerLeaf() (bool, error) {
2904 if j.Len() == 0 {
2905 return true, nil
2906 }
2907 for _, c := range j {
2908 child, err := c.HasContainerLeaf()
2909 if err != nil {
2910 return false, err
2911 }
2912 if child {
2913 return true, nil
2914 }
2915 }
2916 return false, nil
2917}
2918
2919func (j jsonNull) HasContainerLeaf() (bool, error) { return false, nil }
2920func (j jsonTrue) HasContainerLeaf() (bool, error) { return false, nil }

Callers

nothing calls this directly

Calls 2

LenMethod · 0.95
HasContainerLeafMethod · 0.65

Tested by

no test coverage detected