move lang.Must into logx.Must to make sure output fatal message as json

This commit is contained in:
kevin
2020-08-14 15:08:06 +08:00
parent 9d9399ad10
commit 8745039877
21 changed files with 69 additions and 70 deletions

View File

@@ -5,12 +5,12 @@ import (
"time"
"github.com/tal-tech/go-zero/core/discov"
"github.com/tal-tech/go-zero/core/lang"
"github.com/tal-tech/go-zero/core/logx"
)
func main() {
sub, err := discov.NewSubscriber([]string{"etcd.discovery:2379"}, "028F2C35852D", discov.Exclusive())
lang.Must(err)
logx.Must(err)
ticker := time.NewTicker(time.Second * 3)
defer ticker.Stop()