From 54f7980162c1f3321e223ebe88477df6529cce28 Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Thu, 16 May 2024 11:18:57 +0200 Subject: [PATCH] fix: Add required key to init config file --- cmd/cc-backend/main.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cmd/cc-backend/main.go b/cmd/cc-backend/main.go index 9d084f2..ed471ac 100644 --- a/cmd/cc-backend/main.go +++ b/cmd/cc-backend/main.go @@ -76,6 +76,9 @@ const configString = ` "kind": "file", "path": "./var/job-archive" }, + "jwts": { + "max-age": "2000h" + }, "clusters": [ { "name": "name", @@ -115,15 +118,15 @@ func initEnv() { os.Exit(0) } - if err := os.WriteFile("config.json", []byte(configString), 0666); err != nil { + if err := os.WriteFile("config.json", []byte(configString), 0o666); err != nil { log.Fatalf("Writing config.json failed: %s", err.Error()) } - if err := os.WriteFile(".env", []byte(envString), 0666); err != nil { + if err := os.WriteFile(".env", []byte(envString), 0o666); err != nil { log.Fatalf("Writing .env failed: %s", err.Error()) } - if err := os.Mkdir("var", 0777); err != nil { + if err := os.Mkdir("var", 0o777); err != nil { log.Fatalf("Mkdir var failed: %s", err.Error()) }