]> Cypherpunks.ru repositories - balloon.git/commitdiff
Reduce lines number, simplify code
authorSergey Matveev <stargrave@stargrave.org>
Sat, 5 Oct 2019 07:58:02 +0000 (10:58 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sat, 5 Oct 2019 07:58:02 +0000 (10:58 +0300)
cmd/balloon/main.go

index 8283a5345e0432e66a73e66ef4f270768b3c06cb..91fddc2924fa03fb74680240a11437c8773f15c7 100644 (file)
@@ -9,15 +9,12 @@ import (
        "cypherpunks.ru/balloon"
 )
 
        "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() {
 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 {
        flag.Parse()
        salt, err := hex.DecodeString(*saltHex)
        if err != nil {