refactor: reorganize modules and add Linux build tooling
This commit is contained in:
21
module/ec/delivery/internal/impl/model.go
Normal file
21
module/ec/delivery/internal/impl/model.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package impl
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user