grip

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: BSD-2-Clause Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoInstallPath  error = errors.New("no install path provided")
	ErrNoAbsolutePath error = errors.New("provided install path is not absolute")
)
View Source
var (

	// InstallPath is the path where the executables will be installed.
	// Must be in PATH
	InstallPath string = ""
)

Functions

func AddEntry

func AddEntry(updatedEntry RepoEntry) error

func CheckPathEnv

func CheckPathEnv()

func DeleteEntryByName

func DeleteEntryByName(name string) error

func DeleteEntryByRepo

func DeleteEntryByRepo(repo string) error

func GetLockFileLines

func GetLockFileLines() ([][]string, error)

func NewProgressBar

func NewProgressBar(size int, description string) *progressbar.ProgressBar

func ParseRepoPath

func ParseRepoPath(repo string) (string, string, error)

func SelfUpdate

func SelfUpdate(version string) error

func UpdateEntry

func UpdateEntry(updatedEntry RepoEntry) error

Types

type Asset

type Asset struct {
	Name        string
	Alias       string
	OS          string
	Arch        string
	DownloadURL string
	Tag         string
	// contains filtered or unexported fields
}

Asset describes a release asset

func GetByTag

func GetByTag(owner, repo, tag string) (*Asset, error)

func GetLatest

func GetLatest(owner, repo string) (*Asset, error)

func (*Asset) BinaryName

func (a *Asset) BinaryName() string

BinaryName guesses the binary name

func (*Asset) Install

func (a *Asset) Install(p string) error

install installs the executable

type RepoEntry

type RepoEntry struct {
	Name        string
	Tag         string
	Repo        string
	InstallPath string
}

func GetAllEntries

func GetAllEntries() ([]RepoEntry, error)

func GetEntryByName

func GetEntryByName(name string) (*RepoEntry, error)

func GetEntryByRepo

func GetEntryByRepo(repo string) (*RepoEntry, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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