updater

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2025 License: BSD-3-Clause, MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OS   = runtime.GOOS
	ARCH = runtime.GOARCH
)

Variables

This section is empty.

Functions

func Update

func Update(version string) error

Update expects a version string and updates the cli to it

Types

type GithubRelease

type GithubRelease struct {
	Id      int    `json:"id"`
	TagName string `json:"tag_name"`
}

GithubRelease represents a release object from the Github API

func LatestLshRelease

func LatestLshRelease() (*GithubRelease, error)

latestLshRelease returns the latest lsh CLI release

type UpdateFile

type UpdateFile struct {
	Name       string
	Dir        string
	Extension  string
	Executable string
}

func NewUpdateFile

func NewUpdateFile() *UpdateFile

func (*UpdateFile) Download

func (uf *UpdateFile) Download(dstPath, version string) error

func (*UpdateFile) Url

func (uf *UpdateFile) Url(version string) string

Jump to

Keyboard shortcuts

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