-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.go
33 lines (26 loc) · 801 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
package main
import (
"time"
"github.com/pobyzaarif/go-logger/logger"
)
var log = logger.NewLog("MAIN")
func main() {
log.Info("hello")
// rand.Seed(time.Now().UnixNano())
// timeDelay := rand.Intn(10)
// fmt.Printf("-- delay %v seconds --\n", timeDelay)
time.Sleep(time.Duration(4) * time.Second)
mappp := map[string]interface{}{"any": "any"}
log.InfoWithData("test map1", mappp)
// process something here
log.TimerStart()
// timeDelay = rand.Intn(5)
// fmt.Printf("-- delay %v seconds --\n", timeDelay)
time.Sleep(time.Duration(2) * time.Second)
log.InfoWithData("test map2", mappp)
// process something here
// timeDelay = rand.Intn(3)
// fmt.Printf("-- delay %v seconds --\n", timeDelay)
time.Sleep(time.Duration(1) * time.Second)
log.InfoWithData("test map3", mappp)
}