chore: finalize lab7 security verification
CI / verify (pull_request) Failing after 41s

This commit is contained in:
2026-11-06 21:43:57 +03:00
parent 5ac64f51fa
commit 7716dc051e
41 changed files with 775 additions and 150 deletions
+5 -6
View File
@@ -2,7 +2,6 @@ package main
import (
"errors"
"log/slog"
"os"
"gitea.privcloud.tech/dizi/mtusi2026lab7/internal/bootstrap"
@@ -11,24 +10,24 @@ import (
func main() {
appLogger := logger.New()
if err := run(appLogger, os.Args[1:]); err != nil {
if err := run(os.Args[1:]); err != nil {
appLogger.Error("application stopped", "error", err)
os.Exit(1)
}
}
func run(logger *slog.Logger, arguments []string) error {
func run(arguments []string) error {
if len(arguments) == 0 {
return bootstrap.RunServer(logger)
return bootstrap.RunServer()
}
if len(arguments) == 1 && arguments[0] == "migrate" {
return bootstrap.RunMigrations()
}
if len(arguments) == 1 && arguments[0] == "dispatch" {
return bootstrap.RunDispatcher(logger)
return bootstrap.RunDispatcher()
}
if len(arguments) == 1 && arguments[0] == "worker" {
return bootstrap.RunWorker(logger)
return bootstrap.RunWorker()
}
if arguments[0] == "reconcile-attachments" {
return bootstrap.RunReconciliation(arguments[1:], os.Stdout)