utils

package
v0.0.0-...-e8d5919 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckExeVersion

func CheckExeVersion(version string)

Checks if the currently running executable is the latest version If not, prompts the user to update. If update is confirmed, the executable is updated and the process is restarted

func CheckIfTempRun

func CheckIfTempRun() bool

Checks if running from a temp directory (go build) Useful for checking if running via `go run main.go` We ignore errors since this only relevant to local development

func Exit

func Exit(code int, deferred ...func())

func ExitIfError

func ExitIfError(err error, code int)

func GetVersionArg

func GetVersionArg(args []string) (semver.SemVer, error)

func UpdateExe

func UpdateExe(url string) error

Updates the currently running executable.

Types

This section is empty.

Jump to

Keyboard shortcuts

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