// Minor returns the minor part of the version.
// E.g. "3.1.7" -> 1
493616
func (v Version) Minor() int {
	parts := strings.Split(string(v), ".")
	if len(parts) >= 2 {
		result, _ := strconv.Atoi(parts[1])
		return result
	}
	return 0
}
1078538
func Version() (int, int, int) {
	var c_major, c_minor, c_patch C.int
	C.rados_version(&c_major, &c_minor, &c_patch)
	return int(c_major), int(c_minor), int(c_patch)
}
180985
func Version(buildVer, buildDate, commitHash string) Option {
	return func(o *Options) {
		BuildVersion = buildVer
		BuildDate = buildDate
		CommitHash = commitHash
	}
}
101723
func (g *Git) Version(context.Context) semver.Version {
	return semver.Version{
		Major: 4,
		Build: []string{"go-git"},
	}
}
518646
func (v *Version) IncrementMinor() error {
	if v.Major == 0 {
		return fmt.Errorf("Minor version can not be incremented for %q", v.String())
	}
	v.Minor += 1
	v.Patch = 0
	return nil
}
601550
func MajorMinorVersion(major, minor uint) Version {
	return Version(fmt.Sprintf("%d.%d", major, minor))
}
882092
func (o *Opts) Version(version string) *Opts {
	//add version option
	g := reflect.ValueOf(&o.internalOpts).Elem()
	o.addOptArg(g.Type().Field(1), g.Field(1))
	o.version = version
	return o
}
392716
func Version(h string) int {
	if h == "" {
		return -1
	}
	if h[0] != 'v' {
		return -1
	}
	if spos := strings.IndexRune(h[1:], '_'); spos >= 0 {
		n, e := strconv.Atoi(h[1 : spos+1])
		if e != nil {
			return -1
		}
		return n
	}
	return -1
}
743524
func MinVersionFromContext(ctx context.Context) (int, bool) {
	minVersion, ok := ctx.Value(minVersionKey).(int)
	return minVersion, ok
}
275512
func checkVersionAbove(major, minor, micro uint) bool {
	return (verMajor > major) ||
		(verMajor == major && verMinor > minor) ||
		(verMajor == major && verMinor == minor && verMicro >= micro)
}
1237224
func (mf MigrationFiles) Less(i, j int) bool {
	return mf[i].Version < mf[j].Version
}
733412
func (c ChartVersions) Less(a, b int) bool {
	// Failed parse pushes to the back.
	i, err := semver.NewVersion(c[a].Version)
	if err != nil {
		return true
	}
	j, err := semver.NewVersion(c[b].Version)
	if err != nil {
		return false
	}
	return i.LessThan(j)
}
613192
func (s *IndicesPutTemplateService) Version(version int) *IndicesPutTemplateService {
	s.version = &version
	return s
}
998823
func (cli *Client) Version() (version string, err error) {
	reps, err := cli.send("VERSION", "")
	if err != nil {
		return
	}
	if len(reps) == 0 {
		err = ErrInvalidReplies
		return
	}
	if len(reps[0].Data) == 0 {
		err = ErrInvalidReplies
		return
	}
	version = reps[0].Data[0]
	return
}
918135
func VersionAfterOrEqual(version string, major, minor int) bool {
	ver, _ := Parse(version)
	if ver.IsDevel() {
		return true
	}
	return ver.AfterOrEqual(GoVersion{major, minor, -1, 0, 0, ""})
}
931984
func (v Version) LesserEqual(o *Version) bool {
	if o == nil {
		return v.Equals(o)
	}

	if v.Scalar == o.Scalar {
		return v.PID <= o.PID
	}
	return v.Scalar < o.Scalar
}
25009
func (s *storeMemoizer) Version(ctx context.Context) string {
	return s.s.Version(ctx)
}