Fixup documentation
- better gomarkdown generation that now fixed the escaped strings, no need to use pandoc anymore - added workflow image - upgraded versions of mkdocs requirements
This commit is contained in:
@@ -2,54 +2,59 @@
|
||||
|
||||
# update
|
||||
|
||||
``` go
|
||||
```go
|
||||
import "katenary/update"
|
||||
```
|
||||
|
||||
Update package is used to check if a new version of katenary is
|
||||
available.
|
||||
Update package is used to check if a new version of katenary is available.
|
||||
|
||||
## Variables
|
||||
|
||||
``` go
|
||||
var Version = "master" // reset by cmd/main.go
|
||||
<a name="Version"></a>
|
||||
|
||||
```go
|
||||
var (
|
||||
Version = "master" // reset by cmd/main.go
|
||||
)
|
||||
```
|
||||
|
||||
## func DownloadFile
|
||||
<a name="DownloadFile"></a>
|
||||
## func [DownloadFile](<https://github.com/metal3d/katenary/blob/develop/update/main.go#L134>)
|
||||
|
||||
``` go
|
||||
```go
|
||||
func DownloadFile(url, exe string) error
|
||||
```
|
||||
|
||||
DownloadFile will download a url to a local file. It also ensure that
|
||||
the file is executable.
|
||||
DownloadFile will download a url to a local file. It also ensure that the file is executable.
|
||||
|
||||
## func DownloadLatestVersion
|
||||
<a name="DownloadLatestVersion"></a>
|
||||
## func [DownloadLatestVersion](<https://github.com/metal3d/katenary/blob/develop/update/main.go#L80>)
|
||||
|
||||
``` go
|
||||
```go
|
||||
func DownloadLatestVersion(assets []Asset) error
|
||||
```
|
||||
|
||||
DownloadLatestVersion will download the latest version of katenary.
|
||||
|
||||
## type Asset
|
||||
<a name="Asset"></a>
|
||||
## type [Asset](<https://github.com/metal3d/katenary/blob/develop/update/main.go#L23-L26>)
|
||||
|
||||
Asset is a github asset from release url.
|
||||
|
||||
``` go
|
||||
```go
|
||||
type Asset struct {
|
||||
Name string `json:"name"`
|
||||
URL string `json:"browser_download_url"`
|
||||
}
|
||||
```
|
||||
|
||||
### func CheckLatestVersion
|
||||
<a name="CheckLatestVersion"></a>
|
||||
### func [CheckLatestVersion](<https://github.com/metal3d/katenary/blob/develop/update/main.go#L29>)
|
||||
|
||||
``` go
|
||||
```go
|
||||
func CheckLatestVersion() (string, []Asset, error)
|
||||
```
|
||||
|
||||
CheckLatestVersion check katenary latest version from release and
|
||||
propose to download it
|
||||
CheckLatestVersion check katenary latest version from release and propose to download it
|
||||
|
||||
Generated by [gomarkdoc](https://github.com/princjef/gomarkdoc)
|
||||
Generated by [gomarkdoc](<https://github.com/princjef/gomarkdoc>)
|
||||
|
Reference in New Issue
Block a user