github

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BaseURL = "https://api.github.com"
	Client  = &http.Client{Timeout: time.Second * 5}
)

Functions

func DownloadFile

func DownloadFile(filepath string, url string, client *http.Client) error

Types

type Release

type Release struct {
	Version string `json:"tag_name"`
	ZipUrl  string `json:"zipball_url"`
	URL     string `json:"html_url"`
}

func DownloadRelease

func DownloadRelease(repo string, version string, path string, dest string) (release *Release, err error)

func FetchLatestRelease

func FetchLatestRelease(repo string, client *http.Client) (*Release, error)

func NewReleaseFromVersion

func NewReleaseFromVersion(repo string, version string) *Release

Jump to

Keyboard shortcuts

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