Files
katenary/doc/docs/packages/update.md

56 lines
992 B
Markdown
Raw Normal View History

<!-- Code generated by gomarkdoc. DO NOT EDIT -->
# update
``` go
import "katenary/update"
```
Update package is used to check if a new version of katenary is
available.
## Variables
``` go
var Version = "master" // reset by cmd/main.go
```
## func DownloadFile
``` go
func DownloadFile(url, exe string) error
```
DownloadFile will download a url to a local file. It also ensure that
the file is executable.
## func DownloadLatestVersion
``` go
func DownloadLatestVersion(assets []Asset) error
```
DownloadLatestVersion will download the latest version of katenary.
## type Asset
Asset is a github asset from release url.
``` go
type Asset struct {
Name string `json:"name"`
URL string `json:"browser_download_url"`
}
```
### func CheckLatestVersion
``` go
func CheckLatestVersion() (string, []Asset, error)
```
CheckLatestVersion check katenary latest version from release and
propose to download it
Generated by [gomarkdoc](https://github.com/princjef/gomarkdoc)