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

Function readSearchConsoleRequestBytes

internal/cmd/searchconsole_query_plan.go:229–241  ·  view source on GitHub ↗
(spec string, input io.Reader)

Source from the content-addressed store, hash-verified

227}
228
229func readSearchConsoleRequestBytes(spec string, input io.Reader) ([]byte, error) {
230 spec = strings.TrimSpace(spec)
231 switch {
232 case spec == "", spec == "-", strings.HasPrefix(spec, "@"), strings.HasPrefix(spec, "{"), strings.HasPrefix(spec, "["):
233 return resolveInlineOrFileBytes(spec, input)
234 default:
235 path, err := config.ExpandPath(spec)
236 if err != nil {
237 return nil, err
238 }
239 return os.ReadFile(path) //nolint:gosec // user-provided path
240 }
241}
242
243func parseSearchConsoleDate(value string, flagName string) (string, error) {
244 value = strings.TrimSpace(value)

Callers 1

Calls 2

ExpandPathFunction · 0.92
resolveInlineOrFileBytesFunction · 0.85

Tested by

no test coverage detected