// ToolVersionMap ...
430685
func ToolVersionMap() (map[string]version.Version, error) {
	envmanVersion, err := EnvmanVersion()
	if err != nil {
		return map[string]version.Version{}, err
	}

	stepmanVersion, err := StepmanVersion()
	if err != nil {
		return map[string]version.Version{}, err
	}

	bitriseVersion, err := BitriseCliVersion()
	if err != nil {
		return map[string]version.Version{}, err
	}

	return map[string]version.Version{
		"bitrise": bitriseVersion,
		"envman":  envmanVersion,
		"stepman": stepmanVersion,
	}, nil
}
988383
func Version(c *cli.Context) error {
	if c.Bool("short") {
		fmt.Println(version.VERSION)
		return nil
	}

	tmpl, err := template.New("").Parse(versionTemplate)
	if err != nil {
		logrus.Fatal(err)
	}

	v := struct {
		Version   string
		GitCommit string
		GoVersion string
		BuildTime string
		Os        string
		Arch      string
	}{
		Version:   version.VERSION,
		GitCommit: version.GITCOMMIT,
		GoVersion: runtime.Version(),
		BuildTime: version.BUILDTIME,
		Os:        runtime.GOOS,
		Arch:      runtime.GOARCH,
	}

	if err := tmpl.Execute(os.Stdout, v); err != nil {
		logrus.Fatal(err)
	}
	fmt.Printf("\n")
	return nil
}
101374
func Version(url string, kvdbOptions map[string]string) (string, error) {
	return kvdb.ZookeeperVersion1, nil
}
326871
func NewGeneralToolsConstraint(majorVersion, minorVersion int, params simplestreams.LookupParams) *ToolsConstraint {
	return &ToolsConstraint{LookupParams: params, Version: version.Zero,
		MajorVersion: majorVersion, MinorVersion: minorVersion}
}
82653
func (c *ConfigLocal) MetadataVersion() kbfsmd.MetadataVer {
	c.lock.RLock()
	defer c.lock.RUnlock()
	return c.metadataVersion
}
1267635
func goToolVersion() (toolVersion, error) {
	goTool := &tool.T{Cmd: "go"}
	out, err := goTool.Exec("version")
	if err != nil {
		return toolVersionUnknown, err
	}
	build := strings.Split(out, " ")
	if len(build) > 2 {
		return parseToolVersion(build[2]), nil
	}
	return toolVersionUnknown, nil
}
21848
func (c *ServicedCli) cmdVersion(ctx *cli.Context) {

	var versionInfo = map[string]string{
		"Version":            servicedversion.Version,
		"GoVersion":          servicedversion.GoVersion,
		"Gitcommit":          servicedversion.Gitcommit,
		"Gitbranch":          servicedversion.Gitbranch,
		"Date":               servicedversion.Date,
		"Release":            servicedversion.Release,
		"IsvcsImage":         fmt.Sprintf("%s:%s", isvcs.IMAGE_REPO, isvcs.IMAGE_TAG),
		"IsvcsZKImage":       fmt.Sprintf("%s:%s", isvcs.ZK_IMAGE_REPO, isvcs.ZK_IMAGE_TAG),
	}

	// Only populate the 'IsvcsApiProxyImage' value if the api proxy is configured to start.
	if config.GetOptions().StartAPIKeyProxy {
		versionInfo["IsvcsApiProxyImage"] = fmt.Sprintf("%s:%s", isvcs.API_KEY_PROXY_REPO, isvcs.API_KEY_PROXY_TAG)
	}

	if ctx.Bool("verbose") {
		if jsonVersion, err := json.MarshalIndent(versionInfo, " ", "  "); err != nil {
			fmt.Fprintf(os.Stderr, "failed to marshal version info: %s", err)
			os.Exit(1)
		} else {
			fmt.Println(string(jsonVersion))
		}
	} else {
		fmt.Printf("Version:    %s\n", versionInfo["Version"])
		fmt.Printf("GoVersion:  %s\n", versionInfo["GoVersion"])
		fmt.Printf("Gitcommit:  %s\n", versionInfo["Gitcommit"])
		fmt.Printf("Gitbranch:  %s\n", versionInfo["Gitbranch"])
		fmt.Printf("Date:       %s\n", versionInfo["Date"])
		fmt.Printf("Buildtag:   %s\n", versionInfo["Buildtag"])
		fmt.Printf("Release:    %s\n", versionInfo["Release"])
		images := []string{
			versionInfo["IsvcsImage"], versionInfo["IsvcsZKImage"],
		}
		if image, exists := versionInfo["IsvcsApiProxyImage"]; exists {
			images = append(images, image)
		}
		fmt.Printf("IsvcsImages: %v\n", images)
	}
}
797992
func Version(url string, kvdbOptions map[string]string) (string, error) {
	// Currently we support only v1
	return kvdb.ConsulVersion1, nil
}
1120872
func Version(name string, url string, kvdbOptions map[string]string) (string, error) {
	lock.RLock()
	defer lock.RUnlock()

	if dsVersion, exists := datastoreVersions[name]; exists {
		return dsVersion(url, kvdbOptions)
	}
	return "", ErrNotSupported
}
1280525
func (m *kubeGenericRuntimeManager) APIVersion() (kubecontainer.Version, error) {
	versionObject, err := m.versionCache.Get(m.machineInfo.MachineID)
	if err != nil {
		return nil, err
	}
	typedVersion := versionObject.(*runtimeapi.VersionResponse)

	return newRuntimeVersion(typedVersion.RuntimeApiVersion)
}
98432
func (t *ToolsGetter) Tools(args params.Entities) (params.ToolsResults, error) {
	result := params.ToolsResults{
		Results: make([]params.ToolsResult, len(args.Entities)),
	}
	canRead, err := t.getCanRead()
	if err != nil {
		return result, err
	}
	agentVersion, err := t.getGlobalAgentVersion()
	if err != nil {
		return result, err
	}
	toolsStorage, err := t.toolsStorageGetter.ToolsStorage()
	if err != nil {
		return result, err
	}
	defer toolsStorage.Close()

	for i, entity := range args.Entities {
		tag, err := names.ParseTag(entity.Tag)
		if err != nil {
			result.Results[i].Error = ServerError(ErrPerm)
			continue
		}
		agentToolsList, err := t.oneAgentTools(canRead, tag, agentVersion, toolsStorage)
		if err == nil {
			result.Results[i].ToolsList = agentToolsList
			// TODO(axw) Get rid of this in 1.22, when all upgraders
			// are known to ignore the flag.
			result.Results[i].DisableSSLHostnameVerification = true
		}
		result.Results[i].Error = ServerError(err)
	}
	return result, nil
}
815596
func NewApplicationVersionSetCommand(ctx Context) (cmd.Command, error) {
	cmd := &applicationVersionSetCommand{ctx: ctx}
	return cmd, nil
}
527646
func (c *ClientupdateListCall) Version(version string) *ClientupdateListCall {
	c.urlParams_.Set("version", version)
	return c
}
7787
func NewVersionedToolsConstraint(vers version.Number, params simplestreams.LookupParams) *ToolsConstraint {
	return &ToolsConstraint{LookupParams: params, Version: vers}
}
513586
func Version(url string, kvdbOptions map[string]string) (string, error) {
	return kvdb.MemVersion1, nil
}
598076
func (c *Command) VersionTemplate() string {
	if c.versionTemplate != "" {
		return c.versionTemplate
	}

	if c.HasParent() {
		return c.parent.VersionTemplate()
	}
	return `{{with .Name}}{{printf "%s " .}}{{end}}{{printf "version %s" .Version}}
`
}
1002429
func TableVersions(db *sql.DB) map[string]TableVersion {
	versions := map[string]TableVersion{}
	for tableName := range createLegacyTableStatements {
		// Retrieve the table description.
		var desc string
		err := db.QueryRow(`select obj_description($1::regclass);`, tableName).Scan(&desc)
		if err != nil {
			log.Errorf("Query of table %s description failed: %v", tableName, err)
			continue
		}

		// Attempt to parse a version out of the table description.
		sv, err := semver.ParseVersionStr(desc)
		if err != nil {
			log.Errorf("Failed to parse version from table description %s: %v",
				desc, err)
			continue
		}

		versions[tableName] = NewTableVersion(sv.Split())
	}
	return versions
}