MCPcopy
hub / github.com/kubernetes/client-go / parseJSONPath

Function parseJSONPath

plugin/pkg/client/auth/gcp/gcp.go:344–354  ·  view source on GitHub ↗
(input interface{}, name, template string)

Source from the content-addressed store, hash-verified

342}
343
344func parseJSONPath(input interface{}, name, template string) (string, error) {
345 j := jsonpath.New(name)
346 buf := new(bytes.Buffer)
347 if err := j.Parse(template); err != nil {
348 return "", err
349 }
350 if err := j.Execute(buf, input); err != nil {
351 return "", err
352 }
353 return buf.String(), nil
354}
355
356type conditionalTransport struct {
357 oauthTransport *oauth2.Transport

Callers 1

parseTokenCmdOutputMethod · 0.85

Calls 4

NewFunction · 0.92
ExecuteMethod · 0.80
StringMethod · 0.65
ParseMethod · 0.45

Tested by

no test coverage detected