func IsCompatible(constraint string) (bool, error) {
	if constraint == "" || cmd.Version == "" {
		return true, nil
	}
	if cmd.Version == "latest" {
		return true, nil
	}
	binVersion, err := version.NewVersion(cmd.Version)
	if err != nil {
		return false, fmt.Errorf("interpreting binary version %q: %v", cmd.Version, err)
	}
	templateConstraint, err := version.NewConstraint(constraint)
	if err != nil {
		return false, fmt.Errorf("interpreting template version constraint %q: %v", templateConstraint, err)
	}
	return templateConstraint.Check(binVersion), nil
}
IsCompatible returns whether the given string version constraint is compatible with the binary version.
Compatibility is determined by github.com/hashicorp/go-version.
It returns an error if the constraint string or binary version cannot be interpreted.
package version
import (
	"fmt"
	"github.com/GoogleCloudPlatform/healthcare-data-protection-suite/cmd"
	"github.com/hashicorp/go-version"
)