Documentation
¶
Index ¶
- Variables
- func B2SumRun(r *cmd.Root, c *cmd.Sub)
- func Base32Run(r *cmd.Root, c *cmd.Sub)
- func Base64Run(r *cmd.Root, c *cmd.Sub)
- func BasenameRun(r *cmd.Root, c *cmd.Sub)
- func CatRun(r *cmd.Root, c *cmd.Sub)
- func CkSumRun(r *cmd.Root, c *cmd.Sub)
- func EchoRun(r *cmd.Root, c *cmd.Sub)
- func FalseRun(r *cmd.Root, c *cmd.Sub)
- func MD5SumRun(r *cmd.Root, c *cmd.Sub)
- func SHA1SumRun(r *cmd.Root, c *cmd.Sub)
- func SHA224SumRun(r *cmd.Root, c *cmd.Sub)
- func SHA256SumRun(r *cmd.Root, c *cmd.Sub)
- func SHA384SumRun(r *cmd.Root, c *cmd.Sub)
- func SHA512SumRun(r *cmd.Root, c *cmd.Sub)
- func TTYRun(r *cmd.Root, c *cmd.Sub)
- func TrueRun(r *cmd.Root, c *cmd.Sub)
- func WhoAmIRun(r *cmd.Root, c *cmd.Sub)
- func YesRun(r *cmd.Root, c *cmd.Sub)
- type B2SumFlags
- type Base32Args
- type Base32Flags
- type Base64Args
- type Base64Flags
- type BasenameArgs
- type BasenameFlags
- type CatArgs
- type CatFlags
- type CkSumArgs
- type EchoArgs
- type EchoFlags
- type SumArgs
- type SumFlags
- type TTYFlags
- type YesArgs
Constants ¶
This section is empty.
Variables ¶
var B2Sum = cmd.Sub{ Name: "b2sum", Short: "compute and check BLAKE2 message digest", Flags: &B2SumFlags{ Text: true, }, Args: &SumArgs{}, Run: B2SumRun, }
B2Sum implements the "b2sum" subcommand
var Base32 = cmd.Sub{ Name: "base32", Short: "base32 encode/decode data and print to standard output", Flags: &Base32Flags{}, Args: &Base32Args{}, Run: Base32Run, }
Base32 implements the "base32" subcommand
var Base64 = cmd.Sub{ Name: "base64", Short: "base64 encode/decode data and print to standard output", Flags: &Base64Flags{}, Args: &Base64Args{}, Run: Base64Run, }
Base64 implements the "base64" subcommand
var Basename = cmd.Sub{ Name: "basename", Short: "strip directory and suffix from filenames", Flags: &BasenameFlags{}, Args: &BasenameArgs{}, Run: BasenameRun, }
Basename implements the "basename" subcommand
var Cat = cmd.Sub{ Name: "cat", Short: "concatenate files and print on the standard output", Flags: &CatFlags{}, Args: &CatArgs{}, Run: CatRun, }
Cat implements the "cat" subcommand
var CkSum = cmd.Sub{ Name: "cksum", Short: "checksum and count the bytes in a file (IEEE CRC-32, not POSIX)", Args: &CkSumArgs{}, Run: CkSumRun, }
CkSum implements the "cksum" subcommand
var Echo = cmd.Sub{ Name: "echo", Short: "display a line of text", Flags: &EchoFlags{ NoEscapes: true, }, Args: &EchoArgs{}, Run: EchoRun, }
Echo implements the "echo" subcommand
var False = cmd.Sub{ Name: "false", Short: "do nothing, unsuccessfully", Run: FalseRun, }
False implements the "false" subcommand
var MD5Sum = cmd.Sub{ Name: "md5sum", Short: "compute and check MD5 sums", Flags: &SumFlags{ Text: true, }, Args: &SumArgs{}, Run: MD5SumRun, }
MD5Sum implements the "md5sum" subcommand
var SHA1Sum = cmd.Sub{ Name: "sha1sum", Short: "compute and check SHA1 sums", Flags: &SumFlags{ Text: true, }, Args: &SumArgs{}, Run: SHA1SumRun, }
SHA1Sum implements the "sha1sum" subcommand
var SHA224Sum = cmd.Sub{ Name: "sha224sum", Short: "compute and check SHA224 sums", Flags: &SumFlags{ Text: true, }, Args: &SumArgs{}, Run: SHA224SumRun, }
SHA224Sum implements the "sha224sum" subcommand
var SHA256Sum = cmd.Sub{ Name: "sha256sum", Short: "compute and check SHA256 sums", Flags: &SumFlags{ Text: true, }, Args: &SumArgs{}, Run: SHA256SumRun, }
SHA256Sum implements the "sha256sum" subcommand
var SHA384Sum = cmd.Sub{ Name: "sha384sum", Short: "compute and check SHA384 sums", Flags: &SumFlags{ Text: true, }, Args: &SumArgs{}, Run: SHA384SumRun, }
SHA384Sum implements the "sha384sum" subcommand
var SHA512Sum = cmd.Sub{ Name: "sha512sum", Short: "compute and check SHA512 sums", Flags: &SumFlags{ Text: true, }, Args: &SumArgs{}, Run: SHA512SumRun, }
SHA512Sum implements the "sha512sum" subcommand
var TTY = cmd.Sub{ Name: "tty", Short: "print the file name of the terminal connected to standard input", Flags: &TTYFlags{}, Run: TTYRun, }
TTY implements the "tty" subcommand
var True = cmd.Sub{ Name: "true", Short: "do nothing, successfully", Run: TrueRun, }
True implements the "true" subcommand
var WhoAmI = cmd.Sub{ Name: "whoami", Short: "print effective userid", Run: WhoAmIRun, }
WhoAmI implements the "whoami" subcommand
var Yes = cmd.Sub{ Name: "yes", Short: "output a string repeatedly until killed", Args: &YesArgs{}, Run: YesRun, }
Yes implements the "yes" subcommand
Functions ¶
func BasenameRun ¶
BasenameRun carries out the "basename" subcommand
func SHA1SumRun ¶
SHA1SumRun carries out the "sha1sum" subcommand
func SHA224SumRun ¶
SHA224SumRun carries out the "sha224sum" subcommand
func SHA256SumRun ¶
SHA256SumRun carries out the "sha256sum" subcommand
func SHA384SumRun ¶
SHA384SumRun carries out the "sha384sum" subcommand
func SHA512SumRun ¶
SHA512SumRun carries out the "sha512sum" subcommand
Types ¶
type B2SumFlags ¶
type B2SumFlags struct { Binary bool `short:"b" long:"binary" desc:"read in binary mode (default)"` Check bool `short:"c" long:"check" desc:"read sums from the FILEs and check them"` Tag bool `short:"T" long:"tag" desc:"create a BSD-style checksum"` Text bool `short:"t" long:"text" desc:"read in text mode (ignored)"` Zero bool `short:"z" long:"zero" desc:"end each output line with NUL, not newline"` Length int64 `` /* 134-byte string literal not displayed */ }
B2SumFlags are flags unique to the "b2sum" subcommand
type Base32Args ¶
type Base32Args struct {
File string `desc:"File to encode or decode"`
}
Base32Args are args unique to the "base32" subcommand
type Base32Flags ¶
type Base32Flags struct {
Decode bool `short:"d" long:"decode" desc:"decode instead of encode (default)"`
}
Base32Flags are flags unique to the "base32" subcommand
type Base64Args ¶
type Base64Args struct {
File string `desc:"File to encode or decode"`
}
Base64Args are args unique to the "base32" subcommand
type Base64Flags ¶
type Base64Flags struct {
Decode bool `short:"d" long:"decode" desc:"decode instead of encode (default)"`
}
Base64Flags are flags unique to the "base64" subcommand
type BasenameArgs ¶
type BasenameArgs struct {
Paths []string `desc:"Path(s) to compute basename"`
}
BasenameArgs are args unique to the "basename" subcommand
type BasenameFlags ¶
type BasenameFlags struct { Multiple bool `short:"a" long:"multiple" desc:"allow multiple paths to be specified"` Suffix string `short:"s" long:"trim-suffix" desc:"remove a trailing SUFFIX; implies -a"` Zero bool `short:"z" long:"null" desc:"end each output line with NUL, not newline"` }
BasenameFlags are flags unique to the "basename" subcommand
type CatArgs ¶
type CatArgs struct {
Files []string `desc:"Files to concatenate"`
}
CatArgs are args unique to the "cat" subcommand
type CatFlags ¶
type CatFlags struct { All bool `short:"A" long:"all" desc:"equivalent to -v -E -T"` NumberSome bool `short:"b" desc:"number nonempty output lines, overrides -n"` NonprintingEnds bool `short:"e" desc:"equivalent to -v -E"` Ends bool `short:"E" long:"ends" desc:"display $ at the end of each line"` Number bool `short:"n" long:"number" desc:"number all output lines"` Squeeze bool `short:"s" long:"squeeze" desc:"suppress repeated empty output lines"` NonprintingTabs bool `short:"t" desc:"equivalent to -v -T"` Tabs bool `short:"T" long:"tabs" desc:"display TAB characters as ^I"` Nonprinting bool `short:"v" long:"nonprinting" desc:"use ^ and M- notation, except for LFD and TAB"` }
CatFlags are flags unique to the "cat" subcommand
type CkSumArgs ¶
type CkSumArgs struct {
Files []string `zero:"yes" desc:"File to encode or decode"`
}
CkSumArgs are args unique to the "cksum" subcommand
type EchoArgs ¶
type EchoArgs struct {
Strings []string `desc:"strings to print"`
}
EchoArgs are args unique to the "echo" subcommand
type EchoFlags ¶
type EchoFlags struct { NoNewlines bool `short:"n" long:"no-newlines" desc:"do not output the trailing newline"` Escapes bool `short:"e" long:"escapes" desc:"enable interpretation of backslash escapes"` NoEscapes bool `short:"E" long:"no-escapes" desc:"disable interpretation of backslash escapes (default)"` }
EchoFlags are flags unique to the "echo" subcommand
type SumArgs ¶
type SumArgs struct {
Files []string `desc:"File(s) to encode or decode"`
}
SumArgs are args shares by all of the "*sum" subcommands
type SumFlags ¶
type SumFlags struct { Binary bool `short:"b" long:"binary" desc:"read in binary mode (default)"` Check bool `short:"c" long:"check" desc:"read sums from the FILEs and check them"` Tag bool `short:"T" long:"tag" desc:"create a BSD-style checksum"` Text bool `short:"t" long:"text" desc:"read in text mode (ignored)"` Zero bool `short:"z" long:"zero" desc:"end each output line with NUL, not newline"` }
SumFlags are flags shared by all of the "*sum" subcommands