Cleanup
This commit is contained in:
parent
2ff8aaf5c4
commit
257fac67ce
23
peer/main.go
23
peer/main.go
@ -1,23 +0,0 @@
|
|||||||
package peer
|
|
||||||
|
|
||||||
import (
|
|
||||||
"flag"
|
|
||||||
"os"
|
|
||||||
)
|
|
||||||
|
|
||||||
func Main() {
|
|
||||||
args := mainArgs{}
|
|
||||||
|
|
||||||
flag.StringVar(&args.NetName, "name", "", "[REQUIRED] The network name.")
|
|
||||||
flag.StringVar(&args.HubAddress, "hub-address", "", "[REQUIRED] The hub address.")
|
|
||||||
flag.StringVar(&args.APIKey, "api-key", "", "[REQUIRED] The node's API key.")
|
|
||||||
flag.Parse()
|
|
||||||
|
|
||||||
if args.NetName == "" || args.HubAddress == "" || args.APIKey == "" {
|
|
||||||
flag.Usage()
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
|
|
||||||
peer := newPeerMain(args)
|
|
||||||
peer.Run()
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user