MCPcopy
hub / github.com/direnv/direnv / cmdShowDumpAction

Function cmdShowDumpAction

internal/cmd/cmd_show_dump.go:20–34  ·  view source on GitHub ↗
(_ Env, args []string)

Source from the content-addressed store, hash-verified

18}
19
20func cmdShowDumpAction(_ Env, args []string) (err error) {
21 if len(args) < 2 {
22 return fmt.Errorf("missing DUMP argument")
23 }
24
25 var f interface{}
26 err = gzenv.Unmarshal(args[1], &f)
27 if err != nil {
28 return err
29 }
30
31 e := json.NewEncoder(os.Stdout)
32 e.SetIndent("", " ")
33 return e.Encode(f)
34}

Callers

nothing calls this directly

Calls 1

UnmarshalFunction · 0.92

Tested by

no test coverage detected