cmd

package
v0.4.11 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: MIT Imports: 31 Imported by: 0

Documentation

Overview

Package cmd contains the Cobra CLI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArgToTool

func ArgToTool(arg string, os string, arch string, versionAllowed bool) (tool api.Tool, err error)

ArgToTool converts a command line argument to a tool.

func ArgsToTools

func ArgsToTools(
	args []string, os string, arch string, versionAllowed bool,
) ([]api.Tool, error)

ArgsToTools converts a list of command line arguments to a list of tools.

func CalculateSHA256

func CalculateSHA256(body io.Reader) (sha string, err error)

CalculateSHA256 calculates the SHA256 hash of an io.Reader.

func Execute

func Execute()

Execute uses the default settings and executes the root command.

func NewRootCmd

func NewRootCmd(toolctlWriter io.Writer, localAPIFS afero.Fs) *cobra.Command

NewRootCmd returns the root command.

Types

type VersionInfo

type VersionInfo struct {
	GitVersion string
	GitCommit  string
	BuildDate  string
}

VersionInfo holds the version information for a build of toolctl.

Jump to

Keyboard shortcuts

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