MCPcopy Create free account
hub / github.com/containerd/nerdctl / ParseBoolOrAuto

Function ParseBoolOrAuto

pkg/strutil/strutil.go:141–147  ·  view source on GitHub ↗

ParseBoolOrAuto returns (nil, nil) if s is "auto" https://github.com/moby/buildkit/blob/v0.9.1/cmd/buildkitd/config.go#L35-L42

(s string)

Source from the content-addressed store, hash-verified

139// ParseBoolOrAuto returns (nil, nil) if s is "auto"
140// https://github.com/moby/buildkit/blob/v0.9.1/cmd/buildkitd/config.go#L35-L42
141func ParseBoolOrAuto(s string) (*bool, error) {
142 if s == "" || strings.ToLower(s) == "auto" {
143 return nil, nil
144 }
145 b, err := strconv.ParseBool(s)
146 return &b, err
147}

Callers 2

processPullCommandFlagsFunction · 0.92
TestParseBoolOrAutoFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestParseBoolOrAutoFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…