Documentation
¶
Overview ¶
Package gitremote validates remote locations accepted by the native Git adapters.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalid = errors.New("invalid Git remote")
ErrInvalid indicates that a remote is malformed, unsupported, or embeds credentials.
View Source
var ErrRepositoryIdentity = errors.New("git remote has no hosted repository identity")
ErrRepositoryIdentity indicates that a valid remote does not encode a hosted OWNER/REPOSITORY identity.
Functions ¶
Types ¶
type RepositoryIdentity ¶ added in v0.10.0
RepositoryIdentity is the credential-free hosted identity encoded by a remote URL.
func ParseRepositoryIdentity ¶ added in v0.10.0
func ParseRepositoryIdentity(remote string) (RepositoryIdentity, error)
ParseRepositoryIdentity extracts a hosted repository identity from an HTTPS, SSH URL, or SCP-like SSH remote. Local paths and file URLs are valid remotes but do not establish a hosted repository identity.
Click to show internal directories.
Click to hide internal directories.