func IsValidName(name string) bool {
	// doesn't contain the prefix
	if !strings.HasPrefix(name, Prefix) {
		return false
	}
	// it's required to have at least the following chars `x-x-0`
	suffix := name[len(Prefix):]
	if len(suffix) < 5 {
		return false
	}
	// lastly check the last part is a number
	lastHyphen := strings.LastIndex(suffix, "-")
	revision := suffix[lastHyphen+1:]
	_, err := strconv.Atoi(revision)
	return err == nil
}
// IsValidName returns if the name of the lxd profile looks valid.
IsValidName returns if the name of the lxd profile looks valid.
// IsValidName returns if the name of the lxd profile looks valid .
func IsValidName(name string) bool {
	if !strings.HasPrefix(name, Prefix) {
		return false
	}
	suffix := name[len(Prefix):]
	if len(suffix) < 5 {
		return false
	}
	lastHyphen := strings.LastIndex(suffix, "-")
	revision := suffix[lastHyphen+1:]
	_, err := strconv.Atoi(revision)
	return err == nil
}
func IsValidName ( name string ) bool { if ! strings . HasPrefix ( name , Prefix ) { return false } suffix := name [ len ( Prefix ) : ] if len ( suffix ) < 5 { return false } lastHyphen := strings . LastIndex ( suffix , " " ) revision := suffix [ lastHyphen + 1 : ] _ , err := strconv . Atoi ( revision ) return err == nil }
IsValidName returns if the name of the lxd profile looks valid.
IsValidName returns if the name of the lxd profile looks valid .
// doesn't contain the prefix // it's required to have at least the following chars `x-x-0` // lastly check the last part is a number