internal

package
v0.0.0-...-ab55a5e Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package internal contains functions internal to the renew command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Binary

type Binary struct {
	Name       string // The binary name, like "foo".
	LocalPath  string // The binary's local path, like "/Users/calvin/go/bin/foo".
	ImportPath string // The binary's import path, like "github.com/bar/foo".
}

Binary contains information about a binary that is installed.

func BinaryFor

func BinaryFor(name string) (Binary, error)

BinaryFor returns binary metadata for the given binary name.

func InstalledBinaries

func InstalledBinaries() ([]Binary, error)

InstalledBinaries returns all binaries under the path where "go install" would install a binary.

type Updater

type Updater struct {
	Stdout io.Writer
	Stderr io.Writer
	// contains filtered or unexported fields
}

Updater is a client for updating binaries.

func NewUpdater

func NewUpdater() *Updater

NewUpdater returns a new Updater with Stdout and Stderr set to os.Stdout and os.Stderr respectively.

func (*Updater) Update

func (u *Updater) Update(bin Binary) error

Update updates the given binary to the latest version.

Jump to

Keyboard shortcuts

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