exec

package
v0.0.0-...-5bd5390 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

View Source
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

View Source
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

View Source
var Basename = cmd.Sub{
	Name:  "basename",
	Short: "strip directory and suffix from filenames",
	Flags: &BasenameFlags{},
	Args:  &BasenameArgs{},
	Run:   BasenameRun,
}

Basename implements the "basename" subcommand

View Source
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

View Source
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

View Source
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

View Source
var False = cmd.Sub{
	Name:  "false",
	Short: "do nothing, unsuccessfully",
	Run:   FalseRun,
}

False implements the "false" subcommand

View Source
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

View Source
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

View Source
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

View Source
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

View Source
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

View Source
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

View Source
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

View Source
var True = cmd.Sub{
	Name:  "true",
	Short: "do nothing, successfully",
	Run:   TrueRun,
}

True implements the "true" subcommand

View Source
var WhoAmI = cmd.Sub{
	Name:  "whoami",
	Short: "print effective userid",
	Run:   WhoAmIRun,
}

WhoAmI implements the "whoami" subcommand

View Source
var Yes = cmd.Sub{
	Name:  "yes",
	Short: "output a string repeatedly until killed",
	Args:  &YesArgs{},
	Run:   YesRun,
}

Yes implements the "yes" subcommand

Functions

func B2SumRun

func B2SumRun(r *cmd.Root, c *cmd.Sub)

B2SumRun carries out the "b2sum" subcommand

func Base32Run

func Base32Run(r *cmd.Root, c *cmd.Sub)

Base32Run carries out the "base32" subcommand

func Base64Run

func Base64Run(r *cmd.Root, c *cmd.Sub)

Base64Run carries out the "base64" subcommand

func BasenameRun

func BasenameRun(r *cmd.Root, c *cmd.Sub)

BasenameRun carries out the "basename" subcommand

func CatRun

func CatRun(r *cmd.Root, c *cmd.Sub)

CatRun carries out the "cat" subcommand

func CkSumRun

func CkSumRun(r *cmd.Root, c *cmd.Sub)

CkSumRun carries out the "cksum" subcommand

func EchoRun

func EchoRun(r *cmd.Root, c *cmd.Sub)

EchoRun carries out the "echo" subcommand

func FalseRun

func FalseRun(r *cmd.Root, c *cmd.Sub)

FalseRun carries out the "false" subcommand

func MD5SumRun

func MD5SumRun(r *cmd.Root, c *cmd.Sub)

MD5SumRun carries out the "md5sum" subcommand

func SHA1SumRun

func SHA1SumRun(r *cmd.Root, c *cmd.Sub)

SHA1SumRun carries out the "sha1sum" subcommand

func SHA224SumRun

func SHA224SumRun(r *cmd.Root, c *cmd.Sub)

SHA224SumRun carries out the "sha224sum" subcommand

func SHA256SumRun

func SHA256SumRun(r *cmd.Root, c *cmd.Sub)

SHA256SumRun carries out the "sha256sum" subcommand

func SHA384SumRun

func SHA384SumRun(r *cmd.Root, c *cmd.Sub)

SHA384SumRun carries out the "sha384sum" subcommand

func SHA512SumRun

func SHA512SumRun(r *cmd.Root, c *cmd.Sub)

SHA512SumRun carries out the "sha512sum" subcommand

func TTYRun

func TTYRun(r *cmd.Root, c *cmd.Sub)

TTYRun carries out the "tty" subcommand

func TrueRun

func TrueRun(r *cmd.Root, c *cmd.Sub)

TrueRun carries out the "true" subcommand

func WhoAmIRun

func WhoAmIRun(r *cmd.Root, c *cmd.Sub)

WhoAmIRun carries out the "whoami" subcommand

func YesRun

func YesRun(r *cmd.Root, c *cmd.Sub)

YesRun carries out the "yes" 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

func (*CatFlags) Clean

func (f *CatFlags) Clean()

Clean makes sure the flags are minimally set

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

type TTYFlags

type TTYFlags struct {
	Silent bool `short:"s" long:"silent" desc:"print nothing, only return an exit status"`
	Quiet  bool `short:"q" long:"quiet" desc:"alias for (s) silent"`
}

TTYFlags are flags unique to the "tty" subcommand

type YesArgs

type YesArgs struct {
	Strings []string `zero:"yes" desc:"String(s) to print out"`
}

YesArgs are args unique to the "yes" subcommand

Jump to

Keyboard shortcuts

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