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

Function BuildArgsMap

devcontainer/devcontainer.go:310–318  ·  view source on GitHub ↗

BuildArgsMap converts a slice of "KEY=VALUE" strings to a map.

(buildArgs []string)

Source from the content-addressed store, hash-verified

308
309// BuildArgsMap converts a slice of "KEY=VALUE" strings to a map.
310func BuildArgsMap(buildArgs []string) map[string]string {
311 m := make(map[string]string, len(buildArgs))
312 for _, arg := range buildArgs {
313 if key, val, ok := strings.Cut(arg, "="); ok {
314 m[key] = val
315 }
316 }
317 return m
318}
319
320// UserFromDockerfile inspects the contents of a provided Dockerfile
321// and returns the user that will be used to run the container.

Callers 2

runFunction · 0.92
CompileMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected