MCPcopy Create free account
hub / github.com/docker/secrets-engine / MustParseID

Function MustParseID

x/secrets/identifiers.go:171–176  ·  view source on GitHub ↗

MustParseID parses a string into a [ID] and behaves similar to [ParseID], however, it panics when the id is invalid

(s string)

Source from the content-addressed store, hash-verified

169// MustParseID parses a string into a [ID] and behaves similar to
170// [ParseID], however, it panics when the id is invalid
171func MustParseID(s string) ID {
172 if err := valid(s); err != nil {
173 panic(err)
174 }
175 return id(s)
176}

Callers 1

TestIDComparableFunction · 0.85

Calls 2

idTypeAlias · 0.85
validFunction · 0.70

Tested by 1

TestIDComparableFunction · 0.68