From aa8c3690ee19a21b868bd59c2e66c53eb8016115 Mon Sep 17 00:00:00 2001 From: Alvie Rahman Date: Thu, 26 May 2022 02:13:59 +0100 Subject: [PATCH] newline in indexHandler log and log all commands --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 5ece28e..ffe5118 100644 --- a/main.go +++ b/main.go @@ -53,6 +53,7 @@ func indexHandler(w http.ResponseWriter, r *http.Request) { command := r.PostForm.Get("Command") shortlink := r.PostForm.Get("Shortlink") value := r.PostForm.Get("Value") + fmt.Printf("command: %v, shortlink: %v, value: %v\n", command, shortlink, value) fmt.Println(shortlink) fmt.Println(value) @@ -79,7 +80,6 @@ func indexHandler(w http.ResponseWriter, r *http.Request) { ctx := context.Background() _, err := client.Get(ctx, shortlink).Result() if err == redis.Nil { - fmt.Printf("shortlink: %v, value: %v", shortlink, value) err = client.Set(ctx, shortlink, value, 0).Err() if err != nil {