utilities
Miscellaneous useful commands.
gosh
This is a tool for running Go code from the command line.
gosh.snippet
This is for installing the standard gosh snippets.
findCmpRm
This finds files with copies, compares them with the copies and optionally deletes the old copies.
findGoDirs
This finds Go source directories and optionally performs some useful tasks on them or just lists them.
mkparamfilefunc
This is intended to be used with go generate to construct functions that can be used to set the parameter files for packages and commands. It will write a Go file with functions that can be passed to a call to paramset.NewOrDie to set the per-command config files. This will allow the user of a program to set parameters that they want to use every time the program is run.
mkpkgerr
This will generate the code to provide a package-specific error type (pkgError) which allows errors from your package to be distinguished from errors from other sources. It defines an interface called Error which will be satisfied only by errors from your package. The pkgError is not exported and so cannot be used outside of the package but does satisfy the package-specific Error interface (and also the standard error interface). It also provides a local pkgErrorf function that can be used to generate a pkgError. The pkgError is a renaming of string and so a string can simply be cast to a pkgError.
mkdoc
This is a tool for generating markdown files documenting Go programs.
mkbadge
This is a tool for generating badges to be inserted into the README.md file
statfs
This provides an equivalent to the Linux df
command but in a form that is easier
to use in a shell script. The default output is easy for a human to
understand but with the right flags set it can deliver just the value
required.
sleepuntil
This provides a way of repeatedly sleeping until a particular time is reached.
timeconv
This provides a way of simply converting the time from one locale to another. This can be useful when you are working with colleagues in other timezones with different daylight-saving rules.