github.com/khulnasoft-lab/khulnasoft@v26.0.1-0.20240328202558-330a6f959fe0+incompatible/daemon/names/names.go (about)

     1  package names // import "github.com/docker/docker/daemon/names"
     2  
     3  import "regexp"
     4  
     5  // RestrictedNameChars collects the characters allowed to represent a name, normally used to validate container and volume names.
     6  const RestrictedNameChars = `[a-zA-Z0-9][a-zA-Z0-9_.-]`
     7  
     8  // RestrictedNamePattern is a regular expression to validate names against the collection of restricted characters.
     9  var RestrictedNamePattern = regexp.MustCompile(`^` + RestrictedNameChars + `+$`)