github

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoUpgrade = errors.New("requested release is not more recent than current version")

Functions

func SetVerbose

func SetVerbose(enabled bool, writer io.Writer)

func VerboseEnabledForTest

func VerboseEnabledForTest() bool

Types

type AssetFinder

type AssetFinder struct {
	Repo       string
	Tag        string
	Prerelease bool
	MinTime    time.Time
	Getter     HTTPGetter
}

func NewAssetFinder

func NewAssetFinder(repo, tag string, prerelease bool, minTime time.Time) *AssetFinder

func (*AssetFinder) Find

func (f *AssetFinder) Find() ([]string, error)

func (*AssetFinder) FindMatch

func (f *AssetFinder) FindMatch() ([]string, error)

type Error

type Error struct {
	Code   int
	Status string
	Body   []byte
	URL    string
}

func (*Error) Error

func (e *Error) Error() string

type Finder

type Finder interface {
	Find() ([]string, error)
}

type HTTPGetter

type HTTPGetter interface {
	Get(url string) (*http.Response, error)
}

type Release

type Release struct {
	Assets []struct {
		DownloadURL string `json:"browser_download_url"`
	} `json:"assets"`

	Prerelease bool      `json:"prerelease"`
	Tag        string    `json:"tag_name"`
	CreatedAt  time.Time `json:"created_at"`
}

type SourceFinder

type SourceFinder struct {
	Tool string
	Repo string
	Tag  string
}

func NewSourceFinder

func NewSourceFinder(repo, tag, tool string) *SourceFinder

func (*SourceFinder) Find

func (f *SourceFinder) Find() ([]string, error)

Jump to

Keyboard shortcuts

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