Documentation
¶
Overview ¶
Package cli defines the tops command
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Version = "dev"
Version is the tops version reported by tops version and in every --json document. make build and GoReleaser set it with -ldflags -X; go install cannot, so init falls back to the module version it records. Other builds say dev.
Functions ¶
func NewRootCommand ¶
NewRootCommand returns the tops root command with all subcommands attached. Global flags are parsed into opts.
Types ¶
type Options ¶
type Options struct {
JSON bool
NoColor bool
Env string
Getenv func(string) string
Getwd func() (string, error)
Geteuid func() int
Node helper.Host // the matchine tops node reads
}
Options holds the global flags shared by every command, and the process environment, injected so that tests never touch the real one.
Click to show internal directories.
Click to hide internal directories.