Documentation
¶
Overview ¶
package autodiscovery is an implementation of the VCS Autodiscovery RFC.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VCS ¶
VCS represents the Version Control System being used.
func Gitea ¶
Gitea generates VCS for gitea. For instance domain "codeberg.org", uri "pfad.fr/vanitydoc" and defaultBranch "main".
Gitea expects the type of "ref" in the URL (branch/main, tag/v1.0.0), so this is a bit hacky.
func Github ¶
Github generates VCS for github. For instance domain "github.com", uri "fluhus/godoc-tricks" and defaultBranch "main".
func ParseURL ¶
ParseURL parses a forge URL into a VCS struct. Use the scheme to specify the forge type:
- gitea://git.example.com/folder
- gitsrht://git.example.com/folder
Use the username to specify the default branch (main if unspecified):
- gitea://master@git.example.com/folder
- gitsrht://dev@git.example.com/folder
func SourceHutGit ¶
SourceHutGit generates VCS for git.sr.ht. Domain is usually "git.sr.ht", uri "~username/repo" and defaultBranch "main".