main.go
1.3 KB
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
49
50
package main
import (
"github.com/astaxie/beego"
"github.com/tiptok/gocomm/config"
"github.com/tiptok/gocomm/pkg/log"
"gitlab.fjmaimaimai.com/mmm-go/godevp/pkg/constant"
_ "gitlab.fjmaimaimai.com/mmm-go/godevp/pkg/constant"
_ "gitlab.fjmaimaimai.com/mmm-go/godevp/pkg/infrastructure/pg"
_ "gitlab.fjmaimaimai.com/mmm-go/godevp/pkg/infrastructure/redis"
_ "gitlab.fjmaimaimai.com/mmm-go/godevp/pkg/port/beego"
)
func main() {
defer func() {
}()
beego.BConfig.CopyRequestBody = true
log.InitLog(config.Logger{
Filename: constant.LOG_File,
Level: constant.LOG_LEVEL,
})
//{
// // set up a span reporter
// reporter := zipkinhttp.NewReporter("http://106.52.15.41:9411/api/v2/spans")
// defer reporter.Close()
//
// // create our local service endpoint
// endpoint, err := zipkin.NewEndpoint("godevp", "127.0.0.1:8080")
// if err != nil {
// log.Error("unable to create local endpoint: %+v\n", err)
// }
//
// // initialize our tracer
// nativeTracer, err := zipkin.NewTracer(reporter, zipkin.WithLocalEndpoint(endpoint))
// if err != nil {
// log.Error("unable to create tracer: %+v\n", err)
// }
//
// // use zipkin-go-opentracing to wrap our tracer
// tracer := zipkinot.Wrap(nativeTracer)
//
// // optionally set as Global OpenTracing tracer instance
// opentracing.SetGlobalTracer(tracer)
//}
beego.Run()
}