wip-code-check #44

Merged
lash merged 54 commits from wip-code-check into master 2024-09-10 14:25:50 +02:00
Showing only changes of commit 9f034967b5 - Show all commits

View File

@ -112,18 +112,16 @@ func getEngine(cfg engine.Config, rs resource.Resource, pr *persist.Persister) *
func main() { func main() {
var dbDir string var dbDir string
var resourceDir string
var size uint var size uint
var sessionId string var sessionId string
var debug bool var debug bool
flag.StringVar(&sessionId, "session-id", "075xx2123", "session id") flag.StringVar(&sessionId, "session-id", "075xx2123", "session id")
flag.StringVar(&dbDir, "dbdir", ".state", "database dir to read from") flag.StringVar(&dbDir, "dbdir", ".state", "database dir to read from")
flag.StringVar(&resourceDir, "resourcedir", path.Join("services", "registration"), "resource dir")
flag.BoolVar(&debug, "d", false, "use engine debug output") flag.BoolVar(&debug, "d", false, "use engine debug output")
flag.UintVar(&size, "s", 160, "max size of output") flag.UintVar(&size, "s", 160, "max size of output")
lash marked this conversation as resolved
Review

do we need this parameter?

do we need this parameter?
flag.Parse() flag.Parse()
logg.Infof("start command", "dbdir", dbDir, "resourcedir", resourceDir, "outputsize", size) logg.Infof("start command", "dbdir", dbDir, "outputsize", size)
ctx := context.Background() ctx := context.Background()
ctx = context.WithValue(ctx, "SessionId", sessionId) ctx = context.WithValue(ctx, "SessionId", sessionId)
@ -141,7 +139,7 @@ func main() {
FlagCount: uint32(16), FlagCount: uint32(16),
} }
rs, err := getResource(resourceDir, ctx) rs, err := getResource(scriptDir, ctx)
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, err.Error()) fmt.Fprintf(os.Stderr, err.Error())
os.Exit(1) os.Exit(1)