Refactoring, polishing system-cli entry path
This commit is contained in:
parent
14452b0ea5
commit
b6f7d0e097
@ -20,7 +20,9 @@ func main() {
|
||||
ctx := context.AsContext(sigctx.New())
|
||||
|
||||
flags("system", system.Flags, auth.Flags)
|
||||
if err := system.Init(ctx); err != nil {
|
||||
log.Fatalf("Error initializing system: %+v", err)
|
||||
}
|
||||
|
||||
system.Init(ctx)
|
||||
cli.Init(ctx)
|
||||
cli.Run(ctx)
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ import (
|
||||
"github.com/crusttech/crust/system/internal/repository"
|
||||
)
|
||||
|
||||
func Init(ctx context.Context) {
|
||||
func Run(ctx context.Context) {
|
||||
var (
|
||||
db = repository.DB(ctx)
|
||||
settingsService = settings.NewService(settings.NewRepository(db, "sys_settings"))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user