{"modulePath":"github.com/inherelab/eget","version":"v1.17.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package github\n\n## Variables\n\n```go\nvar ErrNoUpgrade = errors.New(\"requested release is not more recent than current version\")\n```\n\n## Functions\n\n```go\nfunc ResolveTag(repo, tag string, prerelease bool, getter HTTPGetter) (string, error)\n```\nResolveTag resolves a tag, or a tag pattern, to a concrete release tag. An empty tag resolves the repository's latest release and a pattern resolves the newest matching release, so callers such as \\`query\\` accept the same tag grammar as an install without selecting an asset.\n\n```go\nfunc SetVerbose(enabled bool, writer io.Writer)\n```\n\n```go\nfunc TagFamilyLatest(repo, prefix string, getter HTTPGetter) (string, bool)\n```\nTagFamilyLatest reports the version-maximum tag among the repository's refs that share the literal prefix, via the matching-refs endpoint (one small response even for monorepos that publish hundreds of releases).\n\nok=false means the family cannot be ordered conclusively — endpoint failure, no matching refs, ambiguous tags or a tie — and the caller must fall back to the release scan instead of assuming the family is exhausted.\n\n```go\nfunc VerboseEnabledForTest() bool\n```\n\n## Types\n\n```go\ntype AssetFinder struct {\n\tRepo       string\n\tTag        string\n\tPrerelease bool\n\tMinTime    time.Time\n\tGetter     HTTPGetter\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewAssetFinder(repo, tag string, prerelease bool, minTime time.Time) *AssetFinder\n```\n\n```go\nfunc (f *AssetFinder) AssetMetadata(url string) (id, size int64, updatedAt time.Time, digest string, ok bool)\n```\n\n```go\nfunc (f *AssetFinder) Find() ([]string, error)\n```\n\n```go\nfunc (f *AssetFinder) FindMatch() ([]string, error)\n```\nFindMatch scans releases newest-first and returns the first whose tag satisfies the filter. Unlike a plain substring match, a bare filter anchors at the tag prefix so it cannot select an unrelated product's release inside a monorepo.\n\nA stable tag is preferred. When only prerelease tags match — common when a monorepo marks each product release prerelease so the repository-wide Latest pointer does not jump between products — the newest prerelease is used.\n\n```go\nfunc (f *AssetFinder) ReleasePublishedAt() time.Time\n```\nReleasePublishedAt reports when the resolved release was published, falling back to its creation time when the API did not list a publish time.\n\n```go\nfunc (f *AssetFinder) ReleaseVersion() string\n```\n\n```go\ntype Error struct {\n\tCode   int\n\tStatus string\n\tBody   []byte\n\tURL    string\n}\n```\n\n```go\nfunc (e *Error) Error() string\n```\n\n```go\ntype Finder interface {\n\tFind() ([]string, error)\n}\n```\n\n```go\ntype HTTPGetter interface {\n\tGet(url string) (*http.Response, error)\n}\n```\n\n```go\ntype HTTPGetterFunc func(url string) (*http.Response, error)\n```\nHTTPGetterFunc adapts a plain function to HTTPGetter.\n\n```go\nfunc (f HTTPGetterFunc) Get(url string) (*http.Response, error)\n```\n\n```go\ntype Release struct {\n\tAssets []releaseAsset `json:\"assets\"`\n\n\tPrerelease bool      `json:\"prerelease\"`\n\tTag        string    `json:\"tag_name\"`\n\tCreatedAt  time.Time `json:\"created_at\"`\n\t// PublishedAt is the release publish time when the API returns one; a\n\t// drafted release lists created_at only.\n\tPublishedAt time.Time `json:\"published_at\"`\n}\n```\n\n```go\ntype ResolvedRelease struct {\n\tTag         string\n\tPublishedAt time.Time\n}\n```\nResolvedRelease is a release picked by tag resolution: the concrete tag and when it was published.\n\n```go\nfunc ResolveRelease(repo, tag string, prerelease bool, getter HTTPGetter) (ResolvedRelease, error)\n```\nResolveRelease resolves a tag, or a tag pattern, to a concrete release and also reports when the matched release was published (falling back to the release creation time when GitHub does not list a publish time).\n\n```go\ntype SourceFinder struct {\n\tTool string\n\tRepo string\n\tTag  string\n}\n```\n\n```go\nfunc NewSourceFinder(repo, tag, tool string) *SourceFinder\n```\n\n```go\nfunc (f *SourceFinder) Find() ([]string, error)\n```\n\n","path":"github.com/inherelab/eget/internal/source/github","name":"github","synopsis":"","isRedistributable":true}
