func CanManageVersion(v string) bool {
	if v == SnapshotVersion {
		return CanManageSnapshot()
	}
	targetVersion, err := semver.NewVersion(v)
	if err != nil {
		return false
	}
	*targetVersion, _ = targetVersion.SetPrerelease("")
	c, _ := semver.NewConstraint(AstarteVersionConstraintString)
	return c.Check(targetVersion)
}
CanManageVersion returns whether the Operator can manage the given version.
package version
import (
	"fmt"
	semver "github.com/Masterminds/semver/v3"
)
const (
	Version = "1.1.0-dev"
	AstarteVersionConstraintString = ">= 0.10.0, < 1.2.0"
	SnapshotVersion = "snapshot"
)
func CanManageSnapshot() bool {
	operatorVersion, err := semver.NewVersion(Version)
	if err != nil {
		return false
	}
	return operatorVersion.Prerelease() != ""
}