chore: use logx.Must instead of log.Fatal (#3189)

This commit is contained in:
Kevin Wan
2023-04-29 23:46:04 +08:00
committed by GitHub
parent a31256b327
commit 8ffe4c01d1
7 changed files with 18 additions and 41 deletions

View File

@@ -1,8 +1,6 @@
package service
import (
"log"
"github.com/zeromicro/go-zero/core/load"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/proc"
@@ -39,9 +37,7 @@ type ServiceConf struct {
// MustSetUp sets up the service, exits on error.
func (sc ServiceConf) MustSetUp() {
if err := sc.SetUp(); err != nil {
log.Fatal(err)
}
logx.Must(sc.SetUp())
}
// SetUp sets up the service.