config

package
v0.17.5 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAndLoad

func CheckAndLoad() error

func Get

func Get() *config

func GetArch

func GetArch() []string

GetArch is the running program's operating system target: one of darwin, freebsd, linux, and so on.

func GetOS

func GetOS() []string

GetOS is the running program's architecture target: one of 386, amd64, arm, s390x, and so on.

func GetOSSpecificExtensions added in v0.5.0

func GetOSSpecificExtensions() []string

func RemoveBinaries

func RemoveBinaries(paths []string) error

RemoveBinaries removes the specified paths from bin configuration. It doesn't care about the order

func UpsertBinary

func UpsertBinary(c *Binary) error

UpsertBinary adds or updats an existing binary resource in the config

Types

type Binary

type Binary struct {
	Path       string `json:"path"`
	RemoteName string `json:"remote_name"`
	Version    string `json:"version"`
	Hash       string `json:"hash"`
	URL        string `json:"url"`
	Provider   string `json:"provider"`
	// if file is installed from a package format (zip, tar, etc) store
	// the package path in config so we don't ask the user to select
	// the path again when upgrading
	PackagePath string `json:"package_path"`
}

Jump to

Keyboard shortcuts

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