-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.go
48 lines (36 loc) · 783 Bytes
/
main.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
47
48
// crypto-wallet-status main.go
package main
import (
"fmt"
"os"
"time"
log "github.com/sirupsen/logrus"
)
// Addthis Adds two ints together
func addThis(a int, b int) (temp int) {
temp = a + b
return
}
func init() {
// 7 LOG LEVELS
// Trace, Debug, Info, Warn, Error, Fatal, Panic
// SET LOG LEVEL
// log.SetLevel(log.InfoLevel)
log.SetLevel(log.TraceLevel)
// SET FORMAT
log.SetFormatter(&log.TextFormatter{})
// log.SetFormatter(&log.JSONFormatter{})
// SET OUTPUT (DEFAULT stderr)
log.SetOutput(os.Stdout)
}
// Looping forever - For the testing Marathon and Mesos
func main() {
log.Info("Let's Start this!")
var a = 0
var b = 1
for {
a = addThis(a, b)
fmt.Println("Hello everyone, the count is:", a)
time.Sleep(2000 * time.Millisecond)
}
}