func validateID(id string) error {
	if !customIdentifier.MatchString(id) {
		return fmt.Errorf("invalid identifier %q: must match %q", id, customIdentifier)
	} else if _, err := uuid.Parse(id); err == nil {
		return fmt.Errorf("invalid identifier %q: must not match UUID format", id)
	} else if len(id) > 80 {
		return fmt.Errorf("invalid identifier %q: must be 80 characters or less", id)
	} else if strings.HasPrefix(id, "-") || strings.HasPrefix(id, ".") {
		return fmt.Errorf("invalid identifier %q: must begin with a number or letter", id)
	} else if strings.HasSuffix(id, "-") || strings.HasSuffix(id, ".") {
		return fmt.Errorf("invalid identifier %q: must end with a number or letter", id)
	}
	return nil
}
validateID returns an error if the provided ID is invalid.
package names
import (
	"fmt"
	"regexp"
	"strings"
	"github.com/google/uuid"
)
const (
	identifier = `([A-Za-z0-9-.]+)`
	revisionTag = `([a-z0-9-]+)`
)
var customIdentifier = regexp.MustCompile(`^[a-z0-9-.]+$`)
func GenerateID() string {
	return uuid.New().String()[:8]
}