version

package
v0.0.0-...-4c37742 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2020 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check()

Check - checks if the current tokaido version is the latest available

func Display

func Display()

Display - Pull the current version info and display in the console

func DownloadAndInstall

func DownloadAndInstall(version string) (string, error)

DownloadAndInstall - Download and install a selected tok version

func GetInstallPath

func GetInstallPath(version string) string

GetInstallPath - Check if tok version is installed or not

func GetLatest

func GetLatest() (*github.ReleaseBody, error)

GetLatest - Hit the GH API to retrieve the latest Tokaido version

func GetReleaseTagFromVersion

func GetReleaseTagFromVersion(version string) (releaseTag string)

GetReleaseTagFromVersion returns a githab-ready release tag from a Tokaido version string

func GetUnisonVersion

func GetUnisonVersion() string

GetUnisonVersion retrieves the current version of Unison and returns it. If the current version isn't supported, we'll error right here.

func Select

func Select(selection string)

Select - Change the users' Tokaido to their selection

func SelfInstall

func SelfInstall(forceInstall bool)

SelfInstall - Check state then install runing Tokaido binary to PATH

func Upgrade

func Upgrade()

Upgrade - Check if update available and auto-upgrade the user

Types

type Info

type Info struct {
	Version   string
	BuildDate string
	GoVersion string
	Compiler  string
	Platform  string
}

Info - Data model for version information

func Get

func Get() Info

Get returns the overall codebase version. It's for detecting what code a binary was built from.

type Latest

type Latest struct {
	Version string `json:"version"`
	URL     string `json:"url"`
}

Latest is the latest version response from release.tokaido.io/latest

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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