MCPcopy
hub / github.com/cloudfoundry/cli / maxPluginCommandNameLength

Function maxPluginCommandNameLength

cf/help/help.go:419–429  ·  view source on GitHub ↗
(plugins map[string]pluginconfig.PluginMetadata, maxNameLen int)

Source from the content-addressed store, hash-verified

417}
418
419func maxPluginCommandNameLength(plugins map[string]pluginconfig.PluginMetadata, maxNameLen int) int {
420 for _, pluginMetadata := range plugins {
421 for _, cmd := range pluginMetadata.Commands {
422 if nameLen := utf8.RuneCountInString(cmd.Name); nameLen > maxNameLen {
423 maxNameLen = nameLen
424 }
425 }
426 }
427
428 return maxNameLen
429}

Callers 1

newAppPresenterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected