MCPcopy Create free account
hub / github.com/coder/envbuilder / Parse

Function Parse

devcontainer/devcontainer.go:25–32  ·  view source on GitHub ↗

Parse parses a devcontainer.json file.

(content []byte)

Source from the content-addressed store, hash-verified

23
24// Parse parses a devcontainer.json file.
25func Parse(content []byte) (*Spec, error) {
26 content, err := hujson.Standardize(content)
27 if err != nil {
28 return nil, fmt.Errorf("standardize json: %w", err)
29 }
30 var schema Spec
31 return &schema, json.Unmarshal(content, &schema)
32}
33
34type Spec struct {
35 Image string `json:"image"`

Callers 4

runFunction · 0.92
RunCacheProbeFunction · 0.92
TestParseFunction · 0.92
TestCompileWithFeaturesFunction · 0.92

Calls

no outgoing calls

Tested by 2

TestParseFunction · 0.74
TestCompileWithFeaturesFunction · 0.74