MCPcopy Index your code
hub / github.com/docker/cli / isValidPluginName

Function isValidPluginName

cli-plugins/manager/plugin.go:184–200  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

182const pluginNameFormat = `^[a-z][a-z0-9]*$`
183
184func isValidPluginName(s string) bool {
185 if len(s) == 0 {
186 return false
187 }
188 // first character must be a-z
189 if c := s[0]; c < 'a' || c > 'z' {
190 return false
191 }
192 // followed by a-z or 0-9
193 for i := 1; i < len(s); i++ {
194 c := s[i]
195 if (c < 'a' || c > 'z') && (c < '0' || c > '9') {
196 return false
197 }
198 }
199 return true
200}

Callers 2

newPluginFunction · 0.85
PluginRunCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…