Documentation
¶
Overview ¶
Package app
Index ¶
- Variables
- type App
- func (a *App) Exit()
- func (a *App) GetArguments() *Args
- func (a *App) PrintDirectory(d *model.Directory)
- func (a *App) ProcessDirectory(d *model.DirectoryEntry) (*model.Directory, error)
- func (a *App) ProcessFiles(files []model.FileEntry) *model.Directory
- func (a *App) Run()
- func (a *App) Write(buf *bytes.Buffer)
- type Args
- type Config
- type Flag
- type FlagType
- type Parser
- type RecursiveLookupFrame
Constants ¶
This section is empty.
Variables ¶
var Version = ""
Functions ¶
This section is empty.
Types ¶
type App ¶
App represents the main application that holds configuration, a writer, exit codes, and a logger.
func (*App) Exit ¶
func (a *App) Exit()
Exit terminates the program with the current stored exit code.
func (*App) GetArguments ¶
GetArguments parses the configured file list and categorizes them as files or directories. It also sets an error exit code for entries that are not accessible.
func (*App) PrintDirectory ¶
Sorts the directory's files according to the app config and prints them.
func (*App) ProcessDirectory ¶
Reads the contents of the given directory, builds a *model.Directory that contains *model.Entry objects for each item, and returns it.
func (*App) ProcessFiles ¶
Converts a slice of file entries into a *model.Directory for printing.
type Args ¶
type Args struct {
Files []model.FileEntry
Dirs []model.DirectoryEntry
}
Args stores the parsed command-line arguments as separate files and directories.
type Config ¶
type Config struct {
FileList []string
AllMode model.Include
SortMode model.SortMode
LongListingMode model.Listing
TimeFormatter format.Timestamp
Recursive bool
GitStatus bool
Reverse bool
DisableIcon bool
OneFilePerLine bool
Directory bool
NoGroup bool
HumanReadable bool
ShowBlockSize bool
ShowInodeNumber bool
}
func GetConfigFromCli ¶
func GetConfigFromCli() *Config
type Parser ¶ added in v1.4.1
func (*Parser) PrintUsage ¶ added in v1.4.1
func (p *Parser) PrintUsage()
type RecursiveLookupFrame ¶
type RecursiveLookupFrame struct {
// contains filtered or unexported fields
}