github

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PatternID             = `id`
	PatternName           = `name`
	PatternURL            = `url`
	PatternHtmlURL        = `html_url`
	PatternTagName        = `tag_name`
	PatternBody           = `body`
	PatternAssetCurrentOS = `assets.#(name%"` + "*" + runtime.GOOS + "*" + runtime.GOARCH + "*" + `").browser_download_url`
)

https://pkg.go.dev/github.com/tidwall/gjson#readme-path-syntax https://docs.github.com/en/rest/reference/repos#get-the-latest-release

Variables

This section is empty.

Functions

func PatternAssetURL added in v0.3.0

func PatternAssetURL(pattern string) string

PatternAssetURL makes releases asset name pattern for download URL.

func RawFile

func RawFile(repo, branch string, files map[string]string) error

RawFile downloads github content raw files.

func Release added in v0.2.0

func Release(repo, pattern string) (string, error)

Release gets github latest release info. pattern: PatternID, PatternTagName, PatternAssetCurrentOS...

func ReleaseAsset added in v0.3.0

func ReleaseAsset(repo, pattern string, opts ...http.Option) error

ReleaseAsset gets github latest release asset download url. pattern: PatternAssetCurrentOS...

Types

This section is empty.

Jump to

Keyboard shortcuts

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