Go to Katenary V3
This is the next-gen of Katenary
This commit is contained in:
55
doc/docs/packages/update.md
Normal file
55
doc/docs/packages/update.md
Normal file
@@ -0,0 +1,55 @@
|
||||
<!-- 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)
|
Reference in New Issue
Block a user