package autodiscovery
import "git.sr.ht/~sircmpwn/gddo/internal/autodiscovery"
Package autodiscovery implements the VCS Autodiscovery RFC.
Index ¶
- type Project
- func Fetch(ctx context.Context, client *http.Client, seriesPath, userAgent string) (*Project, error)
- func (p *Project) DirURL(ref, dir string) string
- func (p *Project) FileURL(ref, dir, file string) string
- func (p *Project) LineURL(ref, dir, file, line string) string
- func (p *Project) RawFileURL(ref, dir, file string) string
Types ¶
type Project ¶
Project facilitates linking to project source code.
func Fetch ¶
func Fetch(ctx context.Context, client *http.Client, seriesPath, userAgent string) (*Project, error)
Fetch fetches project information for the provided module series path. It returns nil if no project information was found.
func (*Project) DirURL ¶
DirURL returns a URL for the given directory.
func (*Project) FileURL ¶
FileURL returns a URL for the given file.
func (*Project) LineURL ¶
LineURL returns a link to the provided line.
func (*Project) RawFileURL ¶
RawFileURL returns a URL for the raw contents of the given file.
Source Files ¶
- Version
- v0.0.0-20240124133021-55358d4d592d (latest)
- Published
- Jan 24, 2024
- Platform
- linux/amd64
- Imports
- 6 packages
- Last checked
- 3 days ago –
Tools for package owners.