aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.go b/main.go
index 94a3415..21473c5 100644
--- a/main.go
+++ b/main.go
@@ -4,7 +4,9 @@ import (
"code.laria.me/petrific/logging"
"flag"
"fmt"
+ "math/rand"
"os"
+ "time"
)
type subcmd func(env *Env, args []string) int
@@ -47,6 +49,8 @@ func main() {
}
func Main() int {
+ rand.Seed(time.Now().UnixNano())
+
flag.Usage = func() {
fmt.Fprintf(os.Stderr, "Usage: %s [global flags] command\n\nAvailable commands:\n", os.Args[0])
for cmd := range subcmds {