package vcs // VCSProvider identifies a VCS platform. Using a typed string instead of bare // strings makes provider values compiler-checkable and prevents typos from // silently passing validation. type VCSProvider string const ( ProviderGitea VCSProvider = "gitea" ProviderGitHub VCSProvider = "github" ) // Valid reports whether p is a known VCS provider. func (p VCSProvider) Valid() bool { switch p { case ProviderGitea, ProviderGitHub: return true default: return false } } // String returns the string representation of the provider. func (p VCSProvider) String() string { return string(p) }