gobinaries

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirectoryLister

type DirectoryLister interface {
	ListDirectoryEntries(path string) ([]string, error)
}

type FilesystemDirectoryLister

type FilesystemDirectoryLister struct{}

func (*FilesystemDirectoryLister) ListDirectoryEntries

func (_ *FilesystemDirectoryLister) ListDirectoryEntries(path string) ([]string, error)

type GoBinary

type GoBinary struct {
	// ModuleURL is the `mod` URL from `go version -m`
	ModuleURL string
	// Path is the `path` URL from `go version -m`
	PathURL string
	Name    string
	// Path is the filesystem path to this binary.
	Path          string
	Version       string
	LatestVersion string
}

func (*GoBinary) BuiltFromSource added in v0.1.1

func (b *GoBinary) BuiltFromSource() bool

BuiltFromSource determines whether the binary was built or installed from source.

func (*GoBinary) BuiltWithGoBuild added in v0.1.1

func (b *GoBinary) BuiltWithGoBuild() bool

func (*GoBinary) UpgradePossible

func (b *GoBinary) UpgradePossible() bool

type Introspecter

type Introspecter struct {
	// contains filtered or unexported fields
}

func NewIntrospecter

func NewIntrospecter(cmdRunner gocli.GoCmdRunner, gobin string, logger *zap.Logger) Introspecter

func (*Introspecter) Introspect

func (i *Introspecter) Introspect(binaryName string) (GoBinary, error)

type IntrospectionResult

type IntrospectionResult struct {
	Binary GoBinary
	Error  error
}

func IntrospectBinaries

func IntrospectBinaries(introspecter *Introspecter, binaryNames []string) []IntrospectionResult

Jump to

Keyboard shortcuts

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