autodiscovery

package
v0.0.0-...-55358d4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package autodiscovery implements the VCS Autodiscovery RFC.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Project

type Project struct {
	Summary string
	Dir     string
	File    string
	RawFile string
	Line    string
}

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

func (p *Project) DirURL(ref, dir string) string

DirURL returns a URL for the given directory.

func (*Project) FileURL

func (p *Project) FileURL(ref, dir, file string) string

FileURL returns a URL for the given file.

func (*Project) LineURL

func (p *Project) LineURL(ref, dir, file, line string) string

LineURL returns a link to the provided line.

func (*Project) RawFileURL

func (p *Project) RawFileURL(ref, dir, file string) string

RawFileURL returns a URL for the raw contents of the given file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL