cli

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsOptionError

func IsOptionError(err error) bool

IsOptionError reports whether err came from option validation.

func PrepareArguments

func PrepareArguments(args []string) []string

PrepareArguments preserves Facter's command precedence: known command flags are moved before normal flags, and bare fact names become query arguments.

func SupportedLogLevel

func SupportedLogLevel(level string) bool

SupportedLogLevel reports whether level is accepted by Ruby-compatible log-level validation.

func ValidateOptions

func ValidateOptions(args []string) error

ValidateOptions reports invalid option combinations before command execution, matching Ruby Facter's validator.

Types

type OptionError

type OptionError struct {
	Err error
}

OptionError identifies command-line option validation failures.

func (*OptionError) Error

func (oe *OptionError) Error() string

func (*OptionError) Unwrap

func (oe *OptionError) Unwrap() error

Jump to

Keyboard shortcuts

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