Documentation ¶
Index ¶
- Variables
- func BaseURL(protocol string, tls bool, trimmedURL string, a ...any) string
- func GetUsername() string
- func GithubTagFromVersion(owner, repo, version string) (string, error)
- func HasContentType(h http.Header, mimetype string) bool
- func InstallProgram(name, filename, url, version, path string) (string, error)
- func IsTLS(trimmedURL string) bool
- func LatestGithubTag(owner, repo string) (string, error)
- func LibraryVersionFromCGVersion(owner, repo, cgVersion string) string
- func LoadVersionsJSON(owner, repo string) (json.RawMessage, error)
- func TrimURL(url string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTagNotFound = errors.New("tag not found") ErrHTTPStatus = errors.New("invalid http status") )
Functions ¶
func BaseURL ¶
BaseURL prepends `protocol + "://"` or `protocol + "s://"` to the url depending on TLS support.
func GetUsername ¶
func GetUsername() string
GetUsername tries to determine the name of the current user. It looks at the following things in order:
- git config user.name
- currently logged in user of the OS
- returns <your-name> with a note to change it
func GithubTagFromVersion ¶
func HasContentType ¶
HasContentType returns true if the 'content-type' header includes mimetype.
func InstallProgram ¶
func LatestGithubTag ¶
func LoadVersionsJSON ¶
func LoadVersionsJSON(owner, repo string) (json.RawMessage, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.