// ArchiveVersion holds the textual version string used for Geth archives.
// e.g. "1.8.11-dea1ce05" for stable releases, or
//      "1.8.13-unstable-21c059b6" for unstable releases
180759
func ArchiveVersion(gitCommit string) string {
	vsn := Version
	if VersionMeta != "stable" {
		vsn += "-" + VersionMeta
	}
	if len(gitCommit) >= 8 {
		vsn += "-" + gitCommit[:8]
	}
	return vsn
}
52315
func (linux Linux) Version() string {
	if len(linux.lsbrelease) == 0 {
		return ""
	}

	rVersion := regexp.MustCompile(versionPattern)
	return rVersion.FindAllStringSubmatch(linux.lsbrelease, 1)[0][1]
}
457751
func GetVersion(uuid []byte) Version {
	ver := uuid[6] >> 4
	if ver > 0 && ver < 6 {
		return Version(ver)
	}

	return VersionUnknown
}
514425
func (v *Version)ParseVersion(version string) (err error) {

	parsedResult := versionRegExp.FindAllStringSubmatch(version, -1)
	if len(parsedResult) != 1 {
		err = errors.Errorf("Invalid version %s", version)
		return
	}
	if len(parsedResult[0]) != 7 {
		err = errors.Errorf("Invalid version %s", version)
		return
	}

	v.Prefix = parsedResult[0][1]
	v.Major = v.intOrZero(parsedResult[0][2])
	v.Minor = v.intOrZero(parsedResult[0][3])
	v.Maintenance = v.intOrZero(parsedResult[0][5])
	v.Suffix = parsedResult[0][6]

	return
}
444038
func Version() (libVersion string, libVersionNumber int, sourceID string) {
	libVersion = C.GoString(C.sqlite3_libversion())
	libVersionNumber = int(C.sqlite3_libversion_number())
	sourceID = C.GoString(C.sqlite3_sourceid())
	return libVersion, libVersionNumber, sourceID
}
1129093
func getVersion() string {
	slurp, err := ioutil.ReadFile(filepath.Join(camliDir, "VERSION"))
	if err == nil {
		return strings.TrimSpace(string(slurp))
	}
	return gitVersion()
}
1202920
func OSVersion() (osVersion string, err error) {
	osVersion = runtime.GOOS + "." + runtime.GOARCH
	return
}
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)
}
340093
func ParseVersion(version string) (ver Version, err error) {
	if version == "" {
		return
	}

	parts := strings.SplitN(version, ".", 4)
	if len(parts) < 2 || len(parts) > 4 {
		err = errors.New(fmt.Sprintf(
			"Version is not in form major.minor(.bugfix.prerelease) (got: %v)",
			version))
		return
	}

	var major, minor, bugfix, prerelease int
	if major, err = parse(parts[0], version, "major"); err != nil {
		return
	}
	if minor, err = parse(parts[1], version, "minor"); err != nil {
		return
	}

	if len(parts) > 2 {
		if bugfix, err = parse(parts[2], version, "bugfix"); err != nil {
			return
		}

		if len(parts) > 3 {
			if prerelease, err = parse(parts[3], version, "prerelease"); err != nil {
				return
			}
			if prerelease == 0 {
				err = errors.New(fmt.Sprintf(
					"Invalid value %v for prerelease; should be 1 or 2 (got: %v)",
					prerelease, version))
				return
			}
		}
	}

	return newVersion(major, minor, bugfix, prerelease), nil
}
101374
func Version(url string, kvdbOptions map[string]string) (string, error) {
	return kvdb.ZookeeperVersion1, nil
}
813839
func (c *Client) Version() (*Env, error) {
	resp, err := c.do("GET", "/version", doOptions{})
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	var env Env
	if err := env.Decode(resp.Body); err != nil {
		return nil, err
	}
	return &env, nil
}
894287
func (h *Handle) LastUpdateVersion() uint64 {
	h.mu.Lock()
	defer h.mu.Unlock()
	return h.mu.lastVersion
}
852012
func (c *Client) DaemonVersion() (string, error) {
	resp, err := c.rpc("daemon.info", rencode.List{}, rencode.Dictionary{})
	if err != nil {
		return "", err
	}
	if resp.IsError() {
		return "", resp.RPCError
	}

	var info string
	err = resp.returnValue.Scan(&info)
	if err != nil {
		return "", err
	}

	return info, nil
}
948959
func (r *BulkUpdateRequest) Version(version int64) *BulkUpdateRequest {
	r.version = version
	r.source = nil
	return r
}
339898
func (c Cid) Version() uint64 {
	if len(c.str) == 34 && c.str[0] == 18 && c.str[1] == 32 {
		return 0
	}
	return 1
}
1206602
func GetVersion(filename string, clnt *etcd.Client) (version string, err error) {
	var qc Config
	qc, err = LoadConfig(filename, clnt, &struct {
		Version string
	}{})
	if err != nil {
		return "", err
	}
	return qc.Version(), nil
}
613192
func (s *IndicesPutTemplateService) Version(version int) *IndicesPutTemplateService {
	s.version = &version
	return s
}