// VersionInitSystem returns an init system name based on the provided
// series. If one cannot be identified a NotFound error is returned.
517755
func VersionInitSystem(series string) (string, error) {
	initName, err := versionInitSystem(series)
	if err != nil {
		return "", errors.Trace(err)
	}
	logger.Debugf("discovered init system %q from series %q", initName, series)
	return initName, nil
}
1336693
func VersionComponentStrings(v Version) (revision string, branch string, version string) {
	switch tv := v.(type) {
	case UnpairedVersion:
	case Revision:
		revision = tv.String()
	case PairedVersion:
		revision = tv.Underlying().String()
	}

	switch v.Type() {
	case IsBranch:
		branch = v.String()
	case IsSemver, IsVersion:
		version = v.String()
	}

	return
}
1117401
func (s *UpdateDocumentInput) SetVersionName(v string) *UpdateDocumentInput {
	s.VersionName = &v
	return s
}
441265
func (v *Version) VersionString() string {
	return fmt.Sprintf("%s%d.%d.%d%s", v.Prefix, v.Major, v.Minor, v.Maintenance, v.Suffix)
}
875216
func (s *PlatformDescription) SetOperatingSystemVersion(v string) *PlatformDescription {
	s.OperatingSystemVersion = &v
	return s
}
1085963
func (s *CreateSubscriptionDefinitionInput) SetInitialVersion(v *SubscriptionDefinitionVersion) *CreateSubscriptionDefinitionInput {
	s.InitialVersion = v
	return s
}
77778
func (met *Metrics) InitSystemMetrics() {
	met.New(MetricProcessStart)
	met.New(MetricGoRoutines)
	met.New(MetricGoVersion)
	met.New(MetricMemoryAllocated)
	met.New(MetricMemoryNumObjects)
	met.New(MetricMemoryGCEnabled)
	met.Set(MetricProcessStart, ProcessStartTime.Unix())

	version := runtime.Version()
	if version[0] == 'g' && version[1] == 'o' {
		parts := strings.Split(version[2:], ".")
		numericVersion := make([]uint64, tmath.MaxI(3, len(parts)))
		for i, p := range parts {
			numericVersion[i], _ = strconv.ParseUint(p, 10, 64)
		}

		met.SetI(MetricGoVersion, int(numericVersion[0]*10000+numericVersion[1]*100+numericVersion[2]))
	}

	met.UpdateSystemMetrics()
}
151195
func init() {
	for _, v := range os.Args {
		if v == "--version" || v == "-version" {
			fmt.Println(VersionString())
			os.Exit(0)
		}
	}
}
110211
func Version() string {
	// Start with the major, minor, and patch versions.
	version := fmt.Sprintf("%d.%d.%d", AppMajor, AppMinor, AppPatch)

	// Append pre-release version if there is one.  The hyphen called for
	// by the semantic versioning spec is automatically appended and should
	// not be contained in the pre-release string.  The pre-release version
	// is not appended if it contains invalid characters.
	preRelease := normalizePreRelString(appPreRelease)
	if preRelease != "" {
		version = fmt.Sprintf("%s-%s", version, preRelease)
	}

	// Append build metadata if there is any.  The plus called for
	// by the semantic versioning spec is automatically appended and should
	// not be contained in the build metadata string.  The build metadata
	// string is not appended if it contains invalid characters.
	build := normalizeBuildString(appBuild)
	if build != "" {
		version = fmt.Sprintf("%s+%s", version, build)
	}

	return version
}
537452
func initDBVersion(tx *bbolt.Tx, version uint32) error {
	_, err := tx.CreateBucketIfNotExists(metadataBkt)
	if err != nil {
		return err
	}

	return putDBVersion(tx, version)
}
328632
func (s *CreateCoreDefinitionInput) SetInitialVersion(v *CoreDefinitionVersion) *CreateCoreDefinitionInput {
	s.InitialVersion = v
	return s
}
591039
func (s *MultiTermvectorService) VersionType(versionType string) *MultiTermvectorService {
	s.versionType = versionType
	return s
}
764546
func (osx OSX) Version() (result string) {
	data := Execute("system_profiler", "SPSoftwareDataType")

	rVersion := regexp.MustCompile(versionPattern)

	subs := rVersion.FindAllStringSubmatch(data, 1)
	if len(subs) == 0 {
		return
	}

	find := subs[0]
	if len(find) < 1 {
		return
	}

	return find[1]
}
1320790
func (s *CreateLoggerDefinitionInput) SetInitialVersion(v *LoggerDefinitionVersion) *CreateLoggerDefinitionInput {
	s.InitialVersion = v
	return s
}
218352
func Version() (major, minor, patch int) {
	if initVersionError != nil {
		return 0, 0, 0
	}
	var maj, min, pat C.int
	C.zmq_version(&maj, &min, &pat)
	return int(maj), int(min), int(pat)
}
1167953
func (c *Command) InitDefaultVersionFlag() {
	if c.Version == "" {
		return
	}

	c.mergePersistentFlags()
	if c.Flags().Lookup("version") == nil {
		usage := "version for "
		if c.Name() == "" {
			usage += "this command"
		} else {
			usage += c.Name()
		}
		c.Flags().Bool("version", false, usage)
	}
}
241525
func (s *RegisterContainerInstanceInput) SetVersionInfo(v *VersionInfo) *RegisterContainerInstanceInput {
	s.VersionInfo = v
	return s
}