gh

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadReleaseAsset

func DownloadReleaseAsset(client *github.Client, tag string, targetOs string, progress bool) (string, error)

DownloadReleaseAsset downloads the release asset for a given platform to a temp file and returns the path to the written file. targetOs should be "windows", "darwin", "linux"

func GetLatestRelease

func GetLatestRelease(client *github.Client) (*github.RepositoryRelease, error)

func GetRelease

func GetRelease(client *github.Client, release string) (*github.RepositoryRelease, error)

func GetReleases

func GetReleases(client *github.Client, n int, releaseType string) ([]*github.RepositoryRelease, error)

func NewClient

func NewClient(token string) *github.Client

Types

type WriteCounter

type WriteCounter struct {
	Written int
	Total   int
	Label   string
	// contains filtered or unexported fields
}

func (*WriteCounter) Write

func (wc *WriteCounter) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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