MCPcopy Create free account
hub / github.com/openclaw/gogcli / collectJSONLeafPaths

Function collectJSONLeafPaths

internal/sheetsformat/format.go:157–185  ·  view source on GitHub ↗
(prefix string, value any, paths *[]string)

Source from the content-addressed store, hash-verified

155}
156
157func collectJSONLeafPaths(prefix string, value any, paths *[]string) {
158 switch typed := value.(type) {
159 case map[string]any:
160 if len(typed) == 0 {
161 if prefix != "" {
162 *paths = append(*paths, prefix)
163 }
164
165 return
166 }
167
168 for key, child := range typed {
169 if strings.TrimSpace(key) == "" {
170 continue
171 }
172
173 next := key
174 if prefix != "" {
175 next = prefix + "." + key
176 }
177
178 collectJSONLeafPaths(next, child, paths)
179 }
180 default:
181 if prefix != "" {
182 *paths = append(*paths, prefix)
183 }
184 }
185}
186
187func splitFieldMask(mask string) []string {
188 if strings.TrimSpace(mask) == "" {

Callers 1

InferMaskFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected