MCPcopy Create free account
hub / github.com/docker/cli / vendorAndVersion

Function vendorAndVersion

cli/cobra.go:319–328  ·  view source on GitHub ↗
(cmd *cobra.Command)

Source from the content-addressed store, hash-verified

317}
318
319func vendorAndVersion(cmd *cobra.Command) string {
320 if vendor, ok := cmd.Annotations[metadata.CommandAnnotationPluginVendor]; ok && isPlugin(cmd) {
321 version := ""
322 if v, ok := cmd.Annotations[metadata.CommandAnnotationPluginVersion]; ok && v != "" {
323 version = ", " + v
324 }
325 return fmt.Sprintf("(%s%s)", vendor, version)
326 }
327 return ""
328}
329
330func managementSubCommands(cmd *cobra.Command) []*cobra.Command {
331 cmds := []*cobra.Command{}

Callers 1

TestVendorAndVersionFunction · 0.85

Calls 1

isPluginFunction · 0.85

Tested by 1

TestVendorAndVersionFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…