MCPcopy Create free account
hub / github.com/cloudbase/garm / printAsJSON

Function printAsJSON

cmd/garm-cli/cmd/root.go:144–151  ·  view source on GitHub ↗
(value interface{})

Source from the content-addressed store, hash-verified

142}
143
144func printAsJSON(value interface{}) {
145 asJs, err := json.Marshal(value)
146 if err != nil {
147 fmt.Printf("Failed to marshal value to json: %s", err)
148 os.Exit(1)
149 }
150 fmt.Println(string(asJs))
151}

Callers 15

formatProvidersFunction · 0.85
formatRepositoriesFunction · 0.85
formatOneRepositoryFunction · 0.85
formatJobsFunction · 0.85
formatOneTemplateFunction · 0.85
formatTemplateListFunction · 0.85
formatOneObjectFunction · 0.85
formatFileObjsListFunction · 0.85
formatScaleSetsFunction · 0.85
formatOneScaleSetFunction · 0.85
formatGiteaCredentialsFunction · 0.85
formatOneGiteaCredentialFunction · 0.85

Calls 1

MarshalMethod · 0.45

Tested by

no test coverage detected