From 4f1dc22094b47918942b4407b52c5be38c139e6f Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sat, 5 Oct 2019 10:58:02 +0300 Subject: [PATCH] Reduce lines number, simplify code --- cmd/balloon/main.go | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/cmd/balloon/main.go b/cmd/balloon/main.go index 8283a53..91fddc2 100644 --- a/cmd/balloon/main.go +++ b/cmd/balloon/main.go @@ -9,15 +9,12 @@ import ( "cypherpunks.ru/balloon" ) -var ( - s = flag.Int("s", 1<<18, "Space cost, number of hash-sized blocks") - t = flag.Int("t", 2, "Time cost, rounds") - p = flag.Int("p", 4, "Number of threads") - saltHex = flag.String("salt", "deadbabe", "Salt, hexadecimal") - passwd = flag.String("passwd", "", "Password") -) - func main() { + s := flag.Int("s", 1<<18, "Space cost, number of hash-sized blocks") + t := flag.Int("t", 2, "Time cost, rounds") + p := flag.Int("p", 4, "Number of threads") + saltHex := flag.String("salt", "deadbabe", "Salt, hexadecimal") + passwd := flag.String("passwd", "", "Password") flag.Parse() salt, err := hex.DecodeString(*saltHex) if err != nil { -- 2.44.0