cat

package
v0.0.0-...-72dfa07 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2019 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CAT_HELP = "\xffConcatenate file[s] or standard input to standard output\n" +
		"Usage: {{.Name}} [global options] {{with .Verbs}}<verb> [verb options]{{end}}\n" +
		"\n" +
		"Global options:" +
		"{{range .Flags}}" +
		"\n\t" +
		"\t{{with .Short}}" + "-{{.}}," + "{{end}}" +
		"\t{{with .Long}}" + "--{{.}}" + "{{end}}" +
		"\t{{.Description}}" +
		"{{with .DefaultValue}}" +
		" (default: {{.}})" +
		"{{end}}" +
		"{{if .Obligatory}}" +
		" (*)" +
		"{{end}}" +
		"{{end}}" +
		"\xff\n\n{{with .Verbs}}Verbs:\xff" +
		"{{range .}}" +
		"\xff\n    {{.Name}}:\xff" +
		"{{range .Flags}}" +
		"\n\t" +
		"\t{{with .Short}}" + "-{{.}}," + "{{end}}" +
		"\t{{with .Long}}" + "--{{.}}" + "{{end}}" +
		"\t{{.Description}}" +
		"{{with .DefaultValue}}" +
		" (default: {{.}})" +
		"{{end}}" +
		"{{if .Obligatory}}" +
		" (*)" +
		"{{end}}" +
		"{{end}}" +
		"{{end}}" +
		"{{end}}" +
		"\n" +
		"With no FILE, or when FILE is -, read standard input.\n\n" +
		"Examples:\n" +
		"  cat f - g  Output f's contents, then standard input, then g's contents.\n" +
		"  cat        Copy standard input to standard output.\n"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CatOptions

type CatOptions struct {
	EoL    bool          `goptions:"-E, --show-ends, description='display $ at end of each line'"`
	Tabs   bool          `goptions:"-T, --show-tabs, description='display TAB characters as ^I'"`
	Number bool          `goptions:"-n, --number, description='number all output lines'"`
	Blank  bool          `goptions:"-b, --number-nonblank, description='number non-blank output lines, overrides -n'"`
	Help   goptions.Help `goptions:"-h, --help, description='print this message'"`
	Files  goptions.Remainder
	// contains filtered or unexported fields
}

func NewCatOptions

func NewCatOptions() *CatOptions

NewCatOptions returns a pointer to a default CatOptions struct, which means curNumber is 1

func (*CatOptions) Cat

func (c *CatOptions) Cat(originalInputStream io.Reader, outputStream io.Writer) error

Jump to

Keyboard shortcuts

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