Skip to content
This repository has been archived by the owner on Mar 21, 2022. It is now read-only.

Commit

Permalink
Add version display
Browse files Browse the repository at this point in the history
  • Loading branch information
tdemin committed Jul 28, 2020
1 parent c6644da commit c958042
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion main.go
@@ -1,7 +1,7 @@
package main

/*
Parts of this file are taken from yggdrasil-go, located at
Parts of this program are taken from yggdrasil-go, located at
https://github.com/yggdrasil-network/yggdrasil-go
See cmd/genkeys/main.go@78b5f88e4bb734d0dd6a138ff08d34ca39dcaea3
Expand All @@ -20,11 +20,19 @@ import (
"github.com/yggdrasil-network/yggdrasil-go/src/crypto"
)

var version = "v0.1.0"

func main() {
rxflag := flag.String("regex", "::", "regex to match addresses against")
threads := flag.Int("threads", runtime.GOMAXPROCS(0), "how many threads to use for mining")
iterationsPerOutput := flag.Uint("iter", 100000, "per how many iterations to output status")
displayVersion := flag.Bool("version", false, "display version")
flag.Parse()
if *displayVersion {
println("syg_go", version)
return
}

regex, err := regexp.Compile(*rxflag)
if err != nil {
log.Printf("%v\n", err)
Expand Down

0 comments on commit c958042

Please sign in to comment.