code.pfad.fr/vanitydoc/autodiscovery

autodiscovery package

import "code.pfad.fr/vanitydoc/autodiscovery"

package autodiscovery is an implementation of the VCS Autodiscovery RFC.

Index

type Forge

Forge indicates the URLs patterrn available in the software forge (with {ref}, {path} and {line} as placeholders).

type VCS

VCS represents the Version Control System being used.

func Forgejo

Forgejo generates VCS for forgejo/gitea. For instance "https://codeberg.org/pfad.fr/vanitydoc" and defaultBranch "main".

func Github

Github generates VCS for github. For instance "https://github.com/fluhus/godoc-tricks" and defaultBranch "main".

func New

NewFromString creates a VCS of the given type (gitsrht, forgejo, github).

func SourceHutGit

SourceHutGit generates VCS for git.sr.ht. For instance "https://git.sr.ht/~username/repo" and defaultBranch "main".

func (VCS) GoImport

GoImport writes the go-import meta tag.

func (VCS) MetaTags

MetaTags writes the VCS Autodiscovery RFC meta tags (which are not empty).

Source Files

autodiscovery.go

Forge

https://codeberg.org/pfad.fr/vanitydoc

git clone
https://codeberg.org/pfad.fr/vanitydoc.git
git@codeberg.org:pfad.fr/vanitydoc.git