refactor: centralize protobuf and remove go-zero
This commit is contained in:
@@ -1,21 +1,10 @@
|
||||
package impl
|
||||
|
||||
import (
|
||||
"os"
|
||||
import "bsm/full/module/ec/delivery/internal/models"
|
||||
|
||||
"bsm/full/module/ec/delivery/internal/models"
|
||||
|
||||
"git.apinb.com/bsm-sdk/engine/print"
|
||||
"git.apinb.com/bsm-sdk/engine/vars"
|
||||
)
|
||||
|
||||
func withModel() {
|
||||
if Configure.DSN != "" {
|
||||
err := models.New(Configure.DSN, nil)
|
||||
if err != nil {
|
||||
print.Fail("[Blocks Service] %s Model Error: %d", vars.ServiceKey, err.Error())
|
||||
os.Exit(0)
|
||||
}
|
||||
print.Info("[Blocks Service] %s Database Source: %s", vars.ServiceKey, Configure.DSN)
|
||||
func withModel() error {
|
||||
if Configure.DSN == "" {
|
||||
return nil
|
||||
}
|
||||
return models.New(Configure.DSN, nil)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user