From 67507b81f03a0178c1a1eda45056d198a05298d0 Mon Sep 17 00:00:00 2001 From: Julien Leicher Date: Wed, 17 May 2023 22:03:49 +0200 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'main.go'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/main.go b/main.go index 6626da3..d2e7ae8 100644 --- a/main.go +++ b/main.go @@ -14,7 +14,7 @@ func main() { dsn := os.Getenv("DSN") if dsn == "" { - panic("db connection string should be set with the DSN env variable!!") + panic("db connection string should be set with the DSN env variable!") } db, err := sql.Open("postgres", dsn) @@ -64,8 +64,9 @@ INSERT INTO runs(date) VALUES (now()); } ctx.JSON(http.StatusOK, response{ - Env: os.Environ(), - Runs: results, + Description: "Simple application which logs in a database the date of each run and exposes environment variables to test seelf.", + Env: os.Environ(), + Runs: results, }) }) @@ -80,6 +81,7 @@ type data struct { } type response struct { - Env []string `json:"env"` - Runs []data `json:"runs"` + Description string `json:"description"` + Env []string `json:"env"` + Runs []data `json:"runs"` }