sm
/
trash
1
0
Fork 0

added a few more shortcuts

This commit is contained in:
Stephen McQuay 2016-11-03 18:31:17 -07:00
parent cf40622e8c
commit e58f07775c
No known key found for this signature in database
GPG Key ID: 1ABF428F71BAFC3D
1 changed files with 3 additions and 3 deletions

View File

@ -15,9 +15,9 @@ func main() {
flag.Parse()
var r io.Reader
switch *algo {
case "low", "00", "0", "nil", "null", "zeros":
case "lo", "low", "00", "0", "nil", "null", "zeros":
r = trash.Zeros
case "ones", "ff", "hi":
case "ones", "ff", "hi", "high":
r = trash.Fs
case "trash", "caca":
r = trash.Reader
@ -26,7 +26,7 @@ func main() {
case "lohi", "55", "5":
r = trash.LoHi
default:
fmt.Fprintf(os.Stderr, "unsupported algorithm: %v\ntry one of 'low', 'high', 'hilo', 'lohi', 'trash'\n", *algo)
fmt.Fprintf(os.Stderr, "unsupported algorithm: %v\ntry one of 'lo(w)', 'hi(gh)', 'hilo', 'lohi', 'trash'\n", *algo)
os.Exit(1)
}
if _, err := io.Copy(os.Stdout, r); err != nil {