Documentation ¶
Index ¶
- func Basename(args ...string) someutils.CliPipable
- func BasenameCli(call []string) (error, int)
- func Cat(fileNames ...string) someutils.CliPipable
- func CatCli(call []string) (error, int)
- func CpCli(call []string) (error, int)
- func DirnameCli(call []string) (error, int)
- func Exec(args ...string) someutils.Pipable
- func Grep(args ...string) someutils.CliPipable
- func GrepCli(call []string) (error, int)
- func Gunzip(args ...string) someutils.CliPipable
- func GunzipCli(call []string) (error, int)
- func GunzipToOut(args ...string) someutils.CliPipable
- func Gzip(args ...string) someutils.CliPipable
- func GzipCli(call []string) (error, int)
- func GzipTo(outFile string) someutils.CliPipable
- func Head(lines int, args ...string) someutils.CliPipable
- func HeadCli(call []string) (error, int)
- func Init()
- func Ls(args ...string) someutils.CliPipable
- func LsCli(call []string) (error, int)
- func LsFact() someutils.CliPipable
- func MvCli(call []string) (error, int)
- func PwdCli(call []string) (error, int)
- func RmCli(call []string) (error, int)
- func SleepCli(call []string) (error, int)
- func TailCli(call []string) (error, int)
- func TarCli(call []string) (error, int)
- func TarItems(tarfile string, includeFiles []string, t *SomeTar, outPipe io.Writer) error
- func TeeCli(call []string) (error, int)
- func TestGzipItem(item io.Reader) error
- func TestGzipItems(items []string) error
- func TestItems(zipfile string, includeFiles []string, outPipe io.Writer, errPipe io.Writer) error
- func TestTarItems(tarfile string, includeFiles []string, inPipe io.Reader, outPipe io.Writer) error
- func TouchCli(call []string) (error, int)
- func Tr(set1, set2 string) someutils.CliPipable
- func TrC(set1 string, set2 string) someutils.CliPipable
- func TrCli(call []string) (error, int)
- func TrD(set1 string) someutils.CliPipable
- func UntarItems(tarfile, destDir string, includeFiles []string, t *SomeTar, inPipe io.Reader, ...) error
- func UnzipCli(call []string) (error, int)
- func UnzipItems(zipfile, destDir string, includeFiles []string, errPipe io.Writer) error
- func WcCli(call []string) (error, int)
- func WhichCli(call []string) (error, int)
- func XargsCli(call []string) (error, int)
- func ZipCli(call []string) (error, int)
- func ZipItems(zipFilename string, itemsToArchive []string) error
- type SomeBasename
- type SomeCat
- func (cat *SomeCat) Invoke(invocation *someutils.Invocation) (error, int)
- func (cat *SomeCat) Name() string
- func (cat *SomeCat) Number() *SomeCat
- func (cat *SomeCat) ParseFlags(call []string, errPipe io.Writer) (error, int)
- func (cat *SomeCat) ShowEnds() *SomeCat
- func (cat *SomeCat) SqueezeBlank() *SomeCat
- type SomeCp
- type SomeDirname
- type SomeExec
- type SomeGrep
- type SomeGunzip
- type SomeGzip
- type SomeHead
- type SomeLs
- type SomeMv
- type SomePwd
- type SomeRm
- type SomeSleep
- type SomeTail
- type SomeTar
- type SomeTee
- type SomeTouch
- type SomeTr
- type SomeUnzip
- type SomeWc
- type SomeWhich
- type SomeXargs
- type SomeZip
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cat ¶
func Cat(fileNames ...string) someutils.CliPipable
func GunzipToOut ¶
func GunzipToOut(args ...string) someutils.CliPipable
func LsFact ¶
func LsFact() someutils.CliPipable
func TestGzipItem ¶
TODO: proper file checking (how to check validity?)
func TestGzipItems ¶
func TestTarItems ¶
func UntarItems ¶
func UnzipItems ¶
Types ¶
type SomeBasename ¶
SomeBasename represents and performs a `basename` invocation
func (*SomeBasename) Invoke ¶
func (basename *SomeBasename) Invoke(invocation *someutils.Invocation) (error, int)
Exec actually performs the basename
func (*SomeBasename) Name ¶
func (basename *SomeBasename) Name() string
Name() returns the name of the util
func (*SomeBasename) ParseFlags ¶
ParseFlags parses flags from a commandline []string
type SomeCat ¶
SomeCat represents and performs a `cat` invocation
func (*SomeCat) ParseFlags ¶
func (*SomeCat) SqueezeBlank ¶
type SomeCp ¶
SomeCp represents and performs a `cp` invocation
type SomeDirname ¶
type SomeDirname struct {
Filenames []string
}
SomeDirname represents and performs a `dirname` invocation
func (*SomeDirname) Invoke ¶
func (dirname *SomeDirname) Invoke(invocation *someutils.Invocation) (error, int)
Exec actually performs the dirname
func (*SomeDirname) Name ¶
func (dirname *SomeDirname) Name() string
Name() returns the name of the util
func (*SomeDirname) ParseFlags ¶
ParseFlags parses flags from a commandline []string
type SomeExec ¶
type SomeExec struct {
// contains filtered or unexported fields
}
SomeExec represents and performs a `exec` invocation
type SomeGrep ¶
type SomeGrep struct { IsPerl bool IsExtended bool IsIgnoreCase bool IsInvertMatch bool IsPrintFilename bool IsPrintLineNumber bool IsRecurse bool IsQuiet bool LinesBefore int LinesAfter int LinesAround int // contains filtered or unexported fields }
SomeGrep represents and performs a `grep` invocation
type SomeGunzip ¶
SomeGunzip represents and performs `gunzip` invocations
func (*SomeGunzip) Invoke ¶
func (gunzip *SomeGunzip) Invoke(invocation *someutils.Invocation) (error, int)
Exec actually performs the gunzip
func (*SomeGunzip) Name ¶
func (gunzip *SomeGunzip) Name() string
Name() returns the name of the util
func (*SomeGunzip) ParseFlags ¶
ParseFlags parses flags from a commandline []string
type SomeGzip ¶
type SomeGzip struct { IsKeep bool IsStdout bool Filenames []string // contains filtered or unexported fields }
SomeGzip represents and performs a `gzip` invocation
type SomeHead ¶
type SomeHead struct { Filenames []string // contains filtered or unexported fields }
SomeHead represents and performs a `head` invocation
type SomeLs ¶
type SomeLs struct { LongList bool Recursive bool Human bool AllFiles bool OnePerLine bool Stdin bool // contains filtered or unexported fields }
SomeLs represents and performs a `ls` invocation
type SomeMv ¶
type SomeMv struct {
// contains filtered or unexported fields
}
SomeMv represents and performs a `mv` invocation
type SomePwd ¶
type SomePwd struct { }
SomePwd represents and performs a `pwd` invocation
type SomeRm ¶
type SomeRm struct { IsRecursive bool // contains filtered or unexported fields }
SomeRm represents and performs a `rm` invocation
type SomeSleep ¶
type SomeSleep struct {
// contains filtered or unexported fields
}
SomeSleep represents and performs a `sleep` invocation
type SomeTail ¶
type SomeTail struct { Lines int FollowByDescriptor bool FollowByName bool SleepInterval float64 Filenames []string }
SomeTail represents and performs a `tail` invocation
type SomeTar ¶
type SomeTar struct { IsCreate bool IsList bool IsExtract bool IsAppend bool //IsCatenate bool IsVerbose bool ArchiveFilename string // contains filtered or unexported fields }
SomeTar represents and performs a `tar` invocation
type SomeTee ¶
type SomeTee struct {
// contains filtered or unexported fields
}
SomeTee represents and performs a `tee` invocation
type SomeTouch ¶
type SomeTouch struct {
// contains filtered or unexported fields
}
SomeTouch represents and performs a `touch` invocation
type SomeTr ¶
type SomeTr struct { IsDelete bool IsSqueeze bool IsComplement bool // currently unused as I just don't get it. // contains filtered or unexported fields }
SomeTr mimics the functionality of the `tr` function from coreutils.
func (*SomeTr) Invoke ¶
func (tr *SomeTr) Invoke(invocation *someutils.Invocation) (error, int)
Invoke actually carries out the command
func (*SomeTr) ParseFlags ¶
ParseFlags parses commandline options.
func (*SomeTr) Preprocess ¶
Parses SET1 and SET2 into a map of translations
type SomeUnzip ¶
type SomeUnzip struct {
// contains filtered or unexported fields
}
SomeUnzip represents and performs a `unzip` invocation
type SomeWc ¶
type SomeWc struct { IsBytes bool IsWords bool IsLines bool // contains filtered or unexported fields }
SomeWc represents and performs a `wc` invocation
type SomeWhich ¶
type SomeWhich struct {
// contains filtered or unexported fields
}
SomeWhich represents and performs a `which` invocation
type SomeXargs ¶
type SomeXargs struct {
// contains filtered or unexported fields
}
SomeXargs represents and performs a `xargs` invocation
func Xargs ¶
func Xargs(utilFactory someutils.CliPipableFactory, args ...string) *SomeXargs
Factory for *SomeXargs