func New(v string) (*Version, error) {
	ver, err := semver.NewVersion(v)
	if err != nil {
		return nil, err
	}
	return FromSemVer(ver), nil
}
New provides an instance of Version from a semver string
package version
import (
	"fmt"
	"os"
	"runtime"
	"strings"
	"github.com/Masterminds/semver/v3"
)
type Info struct {
	GitVersion string `json:"gitVersion"`
	GitCommit  string `json:"gitCommit"`
	BuildDate  string `json:"buildDate"`
	GoVersion  string `json:"goVersion"`
	Compiler   string `json:"compiler"`
	Platform   string `json:"platform"`
}
func (info Info) String() string {
	return info.GitVersion
}
func Get() Info {
	if strings.Contains(gitVersion, "$Format") {
		gitVersion = os.Getenv("KUTTL_DEV_VERSION")
		if gitVersion == "" {
			gitVersion = "dev"
		}
		gitCommit = "dev"
	}
	return Info{
		GitVersion: gitVersion,
		GitCommit:  gitCommit,
		BuildDate:  buildDate,
		GoVersion:  runtime.Version(),
		Compiler:   runtime.Compiler,
		Platform:   fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH),
	}
}
type Version struct {
	*semver.Version
}
func (v *Version) CompareMajorMinor(o *Version) int {
	if d := compareSegment(v.Major(), o.Major()); d != 0 {
		return d
	}
	if d := compareSegment(v.Minor(), o.Minor()); d != 0 {
		return d
	}
	return 0
}
func compareSegment(v1, v2 uint64) int {
	if v1 < v2 {
		return -1
	}
	if v1 > v2 {
		return 1
	}
	return 0
}