fetcher

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound     = errors.New("go.mod not found")
	ErrRateLimited  = errors.New("GitHub API rate limit exceeded")
	ErrUnauthorized = errors.New("unauthorized")
)

Functions

This section is empty.

Types

type GitHubFetcher

type GitHubFetcher struct {
	// contains filtered or unexported fields
}

GitHubFetcher retrieves go.mod files from GitHub repositories via the GitHub REST API.

func NewGitHubFetcher

func NewGitHubFetcher() (*GitHubFetcher, error)

func (*GitHubFetcher) FetchGoMod

func (f *GitHubFetcher) FetchGoMod(ctx context.Context, repo parser.Repo) ([]byte, error)

FetchGoMod retrieves the contents of the go.mod file for the given repository. If repo.Path is set, go.mod is looked up under that subdirectory; otherwise, the repository root is used.

Jump to

Keyboard shortcuts

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