utils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(s []string, e string) bool

Contains check if a string is contained in a slice

func CurrentVersion

func CurrentVersion(binary string, versionCommand []string) (string, error)

CurrentVersion gets the current version for our binary executing the command in a shell and parsing the output.

func Update

func Update(binary string, filePath string, downloadURL string, version string) error

Update downloads new binaries from GitHub repositories

Types

type CheckVersionResponse added in v0.1.3

type CheckVersionResponse struct {
	Outdated bool
	Latest   string
	Current  string
}

CheckVersionResponse tells us if current version is outdated and which version is the latest

func CheckVersion

func CheckVersion(binary string, info config.BinaryConfig, current string) (*CheckVersionResponse, error)

CheckVersion checks if our current version is outdated

Jump to

Keyboard shortcuts

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