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

Function MustNewName

x/api/name.go:49–55  ·  view source on GitHub ↗

MustNewName creates a new Name as [NewName] does, but panics when a validation error occurs.

(s string)

Source from the content-addressed store, hash-verified

47// MustNewName creates a new Name as [NewName] does, but panics when a validation
48// error occurs.
49func MustNewName(s string) Name {
50 v, err := NewName(s)
51 if err != nil {
52 panic(err)
53 }
54 return v
55}
56
57func validName(s string) error {
58 if s == "" {

Callers

nothing calls this directly

Calls 1

NewNameFunction · 0.85

Tested by

no test coverage detected