// GetVersion returns the version string.
162377
func (runner *runner) GetVersion() (string, error) {
	return getIPTablesVersionString(runner.exec, runner.protocol)
}
1072363
func GetKernelVersion() (*VersionInfo, error) {
	uts, err := uname()
	if err != nil {
		return nil, err
	}

	release := make([]byte, len(uts.Release))

	i := 0
	for _, c := range uts.Release {
		release[i] = byte(c)
		i++
	}

	// Remove the \x00 from the release for Atoi to parse correctly
	release = release[:bytes.IndexByte(release, 0)]

	return ParseRelease(string(release))
}
1362997
func RetrievePGVersion(db *sql.DB) (ver string, err error) {
	err = db.QueryRow(internal.RetrievePGVersion).Scan(&ver)
	return
}
963263
func (c *AppversionListCall) Version(version string) *AppversionListCall {
	c.urlParams_.Set("version", version)
	return c
}
257220
func (s *UpdateByQueryService) Version(version bool) *UpdateByQueryService {
	s.version = &version
	return s
}
666966
func (i IndexFile) Get(name, version string) (*ChartVersion, error) {
	vs, ok := i.Entries[name]
	if !ok {
		return nil, ErrNoChartName
	}
	if len(vs) == 0 {
		return nil, ErrNoChartVersion
	}

	var constraint *semver.Constraints
	if len(version) == 0 {
		constraint, _ = semver.NewConstraint("*")
	} else {
		var err error
		constraint, err = semver.NewConstraint(version)
		if err != nil {
			return nil, err
		}
	}

	// when customer input exact version, check whether have exact match one first
	if len(version) != 0 {
		for _, ver := range vs {
			if version == ver.Version {
				return ver, nil
			}
		}
	}

	for _, ver := range vs {
		test, err := semver.NewVersion(ver.Version)
		if err != nil {
			continue
		}

		if constraint.Check(test) {
			return ver, nil
		}
	}
	return nil, fmt.Errorf("No chart version found for %s-%s", name, version)
}
254216
func Version(ver string) {
	if api, ok := apiDefinition(); ok {
		api.Version = ver
	}
}
1326659
func Version() string {
	b, _ := ioutil.ReadFile("../VERSION")
	v := string(b)
	return v
}
1169961
func (g *GistCommit) GetVersion() string {
	if g == nil || g.Version == nil {
		return ""
	}
	return *g.Version
}
182485
func GetVersion() string {
	if currentGitHead == "" {
		b, err := ioutil.ReadFile(".git/HEAD")

		if err != nil {
			currentGitHead = "unknown"
			return currentGitHead
		}

		p := refRE.FindStringSubmatch(string(b))

		if len(p) < 2 {
			currentGitHead = string(b)
			return currentGitHead
		}

		b, err = ioutil.ReadFile(".git/" + p[1])
		if err != nil {
			currentGitHead = p[1]
			return currentGitHead
		}

		currentGitHead = string(b)
	}
	return currentGitHead
}
10981
func (c *ClusterInfo) GetVersion(addr string) (semver.Version, error) {
	endpoint := fmt.Sprintf("http://%s/info", addr)
	var resp struct {
		Version string `json:"version"`
	}
	err := c.client.GETV1(endpoint, &resp)
	if err != nil {
		return semver.Version{}, err
	}
	if resp.Version == "" {
		resp.Version = "unknown"
	}
	return semver.Parse(resp.Version)
}
394795
func (st *MemStorage) GetVersion(gun data.GUN, role data.RoleName, version int) (*time.Time, []byte, error) {
	st.lock.Lock()
	defer st.lock.Unlock()

	id := entryKey(gun, role)
	for _, ver := range st.tufMeta[id] {
		if ver.version == version {
			return &(ver.createupdate), ver.data, nil
		}
	}

	return nil, nil, ErrNotFound{}
}
1307825
func (s *ConfigService) GetVersion() (string, *Response, error) {
	u := "config/server/version"
	return getStringResponseWithoutOptions(s.client, u)
}
227418
func (wr *Wrangler) GetVersion(ctx context.Context, tabletAlias *topodatapb.TabletAlias) (string, error) {
	tablet, err := wr.ts.GetTablet(ctx, tabletAlias)
	if err != nil {
		return "", err
	}

	version, err := getVersionFromTablet(tablet.Addr())
	if err != nil {
		return "", err
	}
	log.Infof("Tablet %v is running version '%v'", topoproto.TabletAliasString(tabletAlias), version)
	return version, err
}
19340
func (f FileVersion) GetVersionString() string {
	return fmt.Sprintf("%d.%d.%d.%d", f.Major, f.Minor, f.Patch, f.Build)
}
504559
func GetPluginVersion(name string) (*ver.Version, error) {
	route, found, err := ReadPluginRoute(name)
	if err != nil {
		return nil, err
	}

	if !found {
		return nil, fmt.Errorf("plugin not installed with name (%s)", name)
	}

	if route.Version == "" {
		return nil, nil
	}

	pluginVersion, err := ver.NewVersion(route.Version)
	if err != nil {
		return nil, err
	}
	if pluginVersion == nil {
		return nil, fmt.Errorf("failed to parse version (%s)", route.Version)
	}

	return pluginVersion, nil
}
1281881
func Get() (ver Version) {
	var godeps interface{}
	if GODEPS != "" {
		_ = json.Unmarshal([]byte(GODEPS), &godeps)
	}
	if BUILDTIME == "" {
		if exectime, err := getExecModifyTime(); err == nil {
			BUILDTIME = exectime.Format(time.RFC1123)
		}
	}
	return Version{
		Name:      NAME,
		Version:   VERSION,
		GoVersion: runtime.Version(),
		BuildTime: BUILDTIME,
		GitCommit: GITCOMMIT,
		Godeps:    godeps,
	}
}