func ToVersion(value string) (semver.Version, error) {
	version := value
	if version == "" {
		version = "0.0.0"
	}
	v, err := semver.NewVersion(version)
	if err != nil {
		return semver.Version{}, err
	}
	return *v, nil
}
ToVersion parse string to semver.Version.
package sv
import "github.com/Masterminds/semver/v3"
type versionType int
const (
	none versionType = iota
	patch
	minor
	major
)