3
0

Refactoring, polishing system-cli entry path

This commit is contained in:
Denis Arh 2019-04-09 08:55:30 +02:00
parent 14452b0ea5
commit b6f7d0e097
2 changed files with 5 additions and 3 deletions

View File

@ -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)
}

View File

@ -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"))