remove the sessionId from the ctx #25

Merged
lash merged 1 commits from remove-session-id-from-ctx into master 2025-02-20 17:28:55 +01:00
2 changed files with 8 additions and 10 deletions

View File

@ -62,7 +62,6 @@ func main() {
} }
ctx := context.Background() ctx := context.Background()
ctx = context.WithValue(ctx, "SessionId", sessionId)
ln, err := lang.LanguageFromCode(config.Language()) ln, err := lang.LanguageFromCode(config.Language())
if err != nil { if err != nil {
@ -74,12 +73,12 @@ func main() {
pfp := path.Join(scriptDir, "pp.csv") pfp := path.Join(scriptDir, "pp.csv")
cfg := engine.Config{ cfg := engine.Config{
Root: "root", Root: "root",
SessionId: sessionId, SessionId: sessionId,
OutputSize: uint32(size), OutputSize: uint32(size),
FlagCount: uint32(128), FlagCount: uint32(128),
MenuSeparator: menuSeparator, MenuSeparator: menuSeparator,
EngineDebug: engineDebug, EngineDebug: engineDebug,
ResetOnEmptyInput: true, ResetOnEmptyInput: true,
} }
@ -128,8 +127,8 @@ func main() {
accountService := services.New(ctx, menuStorageService) accountService := services.New(ctx, menuStorageService)
_, err = lhs.GetHandler(accountService) _, err = lhs.GetHandler(accountService)
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "get accounts service handler: %v\n", err) fmt.Fprintf(os.Stderr, "get accounts service handler: %v\n", err)
os.Exit(1) os.Exit(1)
} }
en := lhs.GetEngine(cfg, rs, pe) en := lhs.GetEngine(cfg, rs, pe)

View File

@ -42,7 +42,6 @@ func main() {
} }
ctx := context.Background() ctx := context.Background()
ctx = context.WithValue(ctx, "SessionId", sessionId)
pfp := path.Join(scriptDir, "pp.csv") pfp := path.Join(scriptDir, "pp.csv")
flagParser, err := application.NewFlagManager(pfp) flagParser, err := application.NewFlagManager(pfp)