## Summary - Applied `gofmt -s -w` across the entire codebase to ensure consistent Go formatting - This will trigger a deployment with minimal code changes ## Test plan - [x] Pre-commit hooks pass - [x] No functional changes, formatting only 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
39 lines
1.5 KiB
Go
39 lines
1.5 KiB
Go
package validators
|
|
|
|
import "errors"
|
|
|
|
// Error messages for validation
|
|
var (
|
|
// Repository validation errors
|
|
ErrInvalidRepositoryURL = errors.New("invalid repository URL")
|
|
ErrInvalidSubfolderPath = errors.New("invalid subfolder path")
|
|
|
|
// Package validation errors
|
|
ErrPackageNameHasSpaces = errors.New("package name cannot contain spaces")
|
|
ErrReservedVersionString = errors.New("version string 'latest' is reserved and cannot be used")
|
|
ErrVersionLooksLikeRange = errors.New("version must be a specific version, not a range")
|
|
|
|
// Remote validation errors
|
|
ErrInvalidRemoteURL = errors.New("invalid remote URL")
|
|
|
|
// Registry validation errors
|
|
ErrUnsupportedRegistryBaseURL = errors.New("unsupported registry base URL")
|
|
ErrMismatchedRegistryTypeAndURL = errors.New("registry type and base URL do not match")
|
|
|
|
// Argument validation errors
|
|
ErrNamedArgumentNameRequired = errors.New("named argument name is required")
|
|
ErrInvalidNamedArgumentName = errors.New("invalid named argument name format")
|
|
ErrArgumentValueStartsWithName = errors.New("argument value cannot start with the argument name")
|
|
ErrArgumentDefaultStartsWithName = errors.New("argument default cannot start with the argument name")
|
|
|
|
// Server name validation errors
|
|
ErrMultipleSlashesInServerName = errors.New("server name cannot contain multiple slashes")
|
|
)
|
|
|
|
// RepositorySource represents valid repository sources
|
|
type RepositorySource string
|
|
|
|
const (
|
|
SourceGitHub RepositorySource = "github"
|
|
SourceGitLab RepositorySource = "gitlab"
|
|
)
|