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

Function Version

cli/compose/schema/schema.go:57–63  ·  view source on GitHub ↗

Version returns the version of the config, defaulting to the latest "3.x" version (3.13). If only the major version "3" is specified, it is used as version "3.x" and returns the default version (latest 3.x).

(config map[string]any)

Source from the content-addressed store, hash-verified

55// version (3.13). If only the major version "3" is specified, it is used as
56// version "3.x" and returns the default version (latest 3.x).
57func Version(config map[string]any) string {
58 version, ok := config[versionField]
59 if !ok {
60 return defaultVersion
61 }
62 return normalizeVersion(fmt.Sprintf("%v", version))
63}
64
65func normalizeVersion(version string) string {
66 switch version {

Callers

nothing calls this directly

Calls 1

normalizeVersionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…