ls

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PathField    = "path"
	NameField    = "name"
	MapperField  = "mapper"
	BatteryField = "battery"
	MirrorField  = "mirror"
	HashField    = "hash"

	FlagOutput  = "output"
	FlagFilter  = "filter"
	FlagSort    = "sort"
	FlagReverse = "reverse"
)

Variables

View Source
var ErrInvalidFormat = errors.New("invalid format")
View Source
var ErrUnknownSortField = errors.New("unknown sort field")

Functions

func New

func New() *cobra.Command

func OutputFormatStrings

func OutputFormatStrings() []string

OutputFormatStrings returns a slice of all String values of the enum

Types

type OutputFormat

type OutputFormat uint8
const (
	OutputFormatTable OutputFormat = iota
	OutputFormatJSON
	OutputFormatYAML
	OutputFormatPath
)

func OutputFormatString

func OutputFormatString(s string) (OutputFormat, error)

OutputFormatString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func OutputFormatValues

func OutputFormatValues() []OutputFormat

OutputFormatValues returns all values of the enum

func (OutputFormat) IsAOutputFormat

func (i OutputFormat) IsAOutputFormat() bool

IsAOutputFormat returns "true" if the value is listed in the enum definition. "false" otherwise

func (OutputFormat) String

func (i OutputFormat) String() string

Jump to

Keyboard shortcuts

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