Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoUpgrade = errors.New("requested release is not more recent than current version")
Functions ¶
func ResolveTag ¶ added in v1.13.0
func ResolveTag(repo, tag string, prerelease bool, getter HTTPGetter) (string, error)
ResolveTag 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.
func SetVerbose ¶
func VerboseEnabledForTest ¶
func VerboseEnabledForTest() bool
Types ¶
type AssetFinder ¶
type AssetFinder struct {
Repo string
Tag string
Prerelease bool
MinTime time.Time
Getter HTTPGetter
// contains filtered or unexported fields
}
func NewAssetFinder ¶
func NewAssetFinder(repo, tag string, prerelease bool, minTime time.Time) *AssetFinder
func (*AssetFinder) AssetMetadata ¶ added in v1.8.8
func (*AssetFinder) Find ¶
func (f *AssetFinder) Find() ([]string, error)
func (*AssetFinder) FindMatch ¶
func (f *AssetFinder) FindMatch() ([]string, error)
FindMatch 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.
A 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.
func (*AssetFinder) ReleaseVersion ¶ added in v1.7.3
func (f *AssetFinder) ReleaseVersion() string
type HTTPGetterFunc ¶ added in v1.13.0
HTTPGetterFunc adapts a plain function to HTTPGetter.
type SourceFinder ¶
func NewSourceFinder ¶
func NewSourceFinder(repo, tag, tool string) *SourceFinder
func (*SourceFinder) Find ¶
func (f *SourceFinder) Find() ([]string, error)