Help us shape the future of Go! Take the 2026 Go Developer Survey

github

package
v0.9.11 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(ctx context.Context, c *cache.Client, urlName string) (string, string, *types.Repo, bool, error)

func LoadWithConfig

func LoadWithConfig(ctx context.Context, _ *cache.Client, urlName string, config *Config) (string, string, *types.Repo, bool, error)

func LoaderForPrefix

func LoaderForPrefix(prefix string) func(context.Context, *cache.Client, string) (string, string, *types.Repo, bool, error)

Types

type Config

type Config struct {
	Prefix      string
	RepoURL     string
	DownloadURL string
	CommitURL   string
	AuthToken   string

	// SkipCommitAPI bypasses the GitHub-style commit-resolution HTTP call
	// and uses `git ls-remote` exclusively. Set this for Forgejo-style hosts
	// whose REST API doesn't expose a `/commits/{ref}` endpoint with the same
	// shape as GitHub's, so error messages don't mislead the operator with
	// references to GitHub or a synthetic sentinel URL.
	SkipCommitAPI bool

	// VendorLabel is the display name used in error messages (e.g. "GitHub"
	// or "Forgejo"). Defaults to "GitHub" if empty.
	VendorLabel string
}

func NewGithubEnterpriseConfig

func NewGithubEnterpriseConfig(prefix string) *Config

Jump to

Keyboard shortcuts

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