-
Notifications
You must be signed in to change notification settings - Fork 0
/
ms.go
46 lines (34 loc) · 755 Bytes
/
ms.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package main
import (
"fmt"
"os"
"os/signal"
"github.com/tylerdmace/mumblestumble/config"
"github.com/tylerdmace/mumblestumble/network"
"github.com/tylerdmace/mumblestumble/version"
)
func main() {
var cfg config.Config
// Clean shutdowns
go func() {
sigchan := make(chan os.Signal, 10)
signal.Notify(sigchan, os.Interrupt)
<-sigchan
shutdown()
}()
printInfo()
// Load config file
cfg.LoadConfig()
// TODO: Wallet
// Bootstrap Network & Chain
network.Bootstrap(cfg)
}
func printInfo() {
fmt.Printf("Mumblestumble - Alpha (Build: %v - %v)\r\n", version.BuildVersion, version.BuildTimestamp)
}
func shutdown() {
fmt.Printf("\r\nShutting down... ")
// Any shutdown work goes here
fmt.Printf("Done.\r\n")
os.Exit(0)
}