Add godoc strings to all exported types, functions, and fields
Documents: - cli: NO_COLOR, RunOptions fields, CLIApp, VersionString - checker: Result fields, Status constants, CheckStatus fields - scanner: EnumerateStatus, ScanStatus, Options, FileEntry fields - log: Level alias, DisableStyling, Init, Info/Debug functions, verbosity helpers, GetLogger, GetLevel, WithError - mfer: ManifestScanOptions, New, NewFromPaths, NewFromFS, MAGIC
This commit is contained in:
@@ -7,6 +7,8 @@ import (
|
||||
"github.com/spf13/afero"
|
||||
)
|
||||
|
||||
// NO_COLOR disables colored output when set. Automatically true if the
|
||||
// NO_COLOR environment variable is present (per https://no-color.org/).
|
||||
var NO_COLOR bool
|
||||
|
||||
func init() {
|
||||
@@ -17,15 +19,16 @@ func init() {
|
||||
}
|
||||
|
||||
// RunOptions contains all configuration for running the CLI application.
|
||||
// Use DefaultRunOptions for standard CLI execution, or construct manually for testing.
|
||||
type RunOptions struct {
|
||||
Appname string
|
||||
Version string
|
||||
Gitrev string
|
||||
Args []string
|
||||
Stdin io.Reader
|
||||
Stdout io.Writer
|
||||
Stderr io.Writer
|
||||
Fs afero.Fs
|
||||
Appname string // Application name displayed in help and version output
|
||||
Version string // Version string (typically set at build time)
|
||||
Gitrev string // Git revision hash (typically set at build time)
|
||||
Args []string // Command-line arguments (typically os.Args)
|
||||
Stdin io.Reader // Standard input stream
|
||||
Stdout io.Writer // Standard output stream
|
||||
Stderr io.Writer // Standard error stream
|
||||
Fs afero.Fs // Filesystem abstraction for file operations
|
||||
}
|
||||
|
||||
// DefaultRunOptions returns RunOptions configured for normal CLI execution.
|
||||
|
||||
Reference in New Issue
Block a user