作者 kevin

update go-zero

@@ -9,5 +9,5 @@ require ( @@ -9,5 +9,5 @@ require (
9 github.com/mailru/easyjson v0.7.3 // indirect 9 github.com/mailru/easyjson v0.7.3 // indirect
10 github.com/olivere/elastic v6.2.34+incompatible 10 github.com/olivere/elastic v6.2.34+incompatible
11 github.com/segmentio/kafka-go v0.3.5 11 github.com/segmentio/kafka-go v0.3.5
12 - github.com/tal-tech/go-zero v1.0.2 12 + github.com/tal-tech/go-zero v1.0.3
13 ) 13 )
@@ -210,8 +210,8 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV @@ -210,8 +210,8 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV
210 github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= 210 github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
211 github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= 211 github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
212 github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= 212 github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
213 -github.com/tal-tech/go-zero v1.0.2 h1:sSQCZ5M+5cgFI9sky4FSuhZ1glEKduKgfCeoSLzuSMM=  
214 -github.com/tal-tech/go-zero v1.0.2/go.mod h1:MZHttkq0yf8kUd3TGaGvwUpiRIw9eD2iNFFfkx4YgG4= 213 +github.com/tal-tech/go-zero v1.0.3 h1:B7yo8yMh27ZfEpjM7s6tPKGaLtSBufIPxTPMwjsiDxI=
  214 +github.com/tal-tech/go-zero v1.0.3/go.mod h1:MZHttkq0yf8kUd3TGaGvwUpiRIw9eD2iNFFfkx4YgG4=
215 github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= 215 github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
216 github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= 216 github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
217 github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= 217 github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
@@ -11,7 +11,7 @@ import ( @@ -11,7 +11,7 @@ import (
11 "github.com/tal-tech/go-stash/stash/filter" 11 "github.com/tal-tech/go-stash/stash/filter"
12 "github.com/tal-tech/go-stash/stash/handler" 12 "github.com/tal-tech/go-stash/stash/handler"
13 "github.com/tal-tech/go-zero/core/conf" 13 "github.com/tal-tech/go-zero/core/conf"
14 - "github.com/tal-tech/go-zero/core/lang" 14 + "github.com/tal-tech/go-zero/core/logx"
15 "github.com/tal-tech/go-zero/core/proc" 15 "github.com/tal-tech/go-zero/core/proc"
16 ) 16 )
17 17
@@ -30,13 +30,13 @@ func main() { @@ -30,13 +30,13 @@ func main() {
30 elastic.SetSniff(false), 30 elastic.SetSniff(false),
31 elastic.SetURL(c.Output.ElasticSearch.Hosts...), 31 elastic.SetURL(c.Output.ElasticSearch.Hosts...),
32 ) 32 )
33 - lang.Must(err) 33 + logx.Must(err)
34 34
35 indexFormat := c.Output.ElasticSearch.DailyIndexPrefix + dateFormat 35 indexFormat := c.Output.ElasticSearch.DailyIndexPrefix + dateFormat
36 var loc *time.Location 36 var loc *time.Location
37 if len(c.Output.ElasticSearch.TimeZone) > 0 { 37 if len(c.Output.ElasticSearch.TimeZone) > 0 {
38 loc, err = time.LoadLocation(c.Output.ElasticSearch.TimeZone) 38 loc, err = time.LoadLocation(c.Output.ElasticSearch.TimeZone)
39 - lang.Must(err) 39 + logx.Must(err)
40 } else { 40 } else {
41 loc = time.Local 41 loc = time.Local
42 } 42 }
@@ -46,7 +46,7 @@ func main() { @@ -46,7 +46,7 @@ func main() {
46 46
47 filters := filter.CreateFilters(c) 47 filters := filter.CreateFilters(c)
48 writer, err := es.NewWriter(c.Output.ElasticSearch, indexer) 48 writer, err := es.NewWriter(c.Output.ElasticSearch, indexer)
49 - lang.Must(err) 49 + logx.Must(err)
50 50
51 handle := handler.NewHandler(writer) 51 handle := handler.NewHandler(writer)
52 handle.AddFilters(filters...) 52 handle.AddFilters(filters...)