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

View File

@ -15,9 +15,9 @@ func main() {
flag.Parse() flag.Parse()
var r io.Reader var r io.Reader
switch *algo { switch *algo {
case "low", "00", "0", "nil", "null", "zeros": case "lo", "low", "00", "0", "nil", "null", "zeros":
r = trash.Zeros r = trash.Zeros
case "ones", "ff", "hi": case "ones", "ff", "hi", "high":
r = trash.Fs r = trash.Fs
case "trash", "caca": case "trash", "caca":
r = trash.Reader r = trash.Reader
@ -26,7 +26,7 @@ func main() {
case "lohi", "55", "5": case "lohi", "55", "5":
r = trash.LoHi r = trash.LoHi
default: 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) os.Exit(1)
} }
if _, err := io.Copy(os.Stdout, r); err != nil { if _, err := io.Copy(os.Stdout, r); err != nil {