flags

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitParsers added in v1.2.0

func InitParsers()

Types

type ArgsStr added in v1.2.0

type ArgsStr struct {
	New      *NewCmd    `arg:"subcommand:new" help:"Create a new text file"`
	Config   *ConfigCmd `arg:"subcommand:config" help:"Configure some program variables"`
	Open     string     `arg:"-o" help:"Open a file for editing or reading" placeholder:"FILE"`
	Delete   string     `arg:"-d,--del" help:"Deletes a file" placeholder:"FILE"`
	Temporal bool       `arg:"-t,--tmp" help:"Specifies whether the operation will be done in the temporary or constant directory."`
	List     bool       `arg:"-l" help:"List all files, whether temporary or not"`
	Print    string     `arg:"-p" help:"Print the file showing its details, without opening an editor." placeholder:"FILE"`
}
var Args ArgsStr

func (ArgsStr) Description added in v1.2.0

func (ArgsStr) Description() string

func (ArgsStr) Version added in v1.3.0

func (ArgsStr) Version() string

type ConfigCmd added in v1.2.0

type ConfigCmd struct {
	Editor string `arg:"-e" default:"nano" help:"Configures the editor"`
	Show   bool   `arg:"-P" help:"Prints the configuration values"`
}

type NewCmd added in v1.2.0

type NewCmd struct {
	Name string `arg:"-n,required" help:"Specifies the file name"`
	Type string `arg:"-t" help:"You specify the file type" default:"txt"`
}

Jump to

Keyboard shortcuts

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