From 472d80b20bf92360109c09c77b8343cae1004025 Mon Sep 17 00:00:00 2001 From: ili16 Date: Thu, 4 Jan 2024 22:01:23 +0100 Subject: [PATCH] remove unnecessary local variable --- main.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/main.go b/main.go index f6b6266..59e7dd4 100644 --- a/main.go +++ b/main.go @@ -47,9 +47,7 @@ func LogRequestBodyMiddleware(c *gin.Context) { func getInfo(c *gin.Context) { - OllamaURL := os.Getenv("OLLAMA_URL") - - resp, err := http.Get(OllamaURL) + resp, err := http.Get(os.Getenv("OLLAMA_URL")) if err != nil { // @@ -67,9 +65,7 @@ func getInfo(c *gin.Context) { func proxy(c *gin.Context) { - OllamaURL := os.Getenv("OLLAMA_URL") - - remote, err := url.Parse(OllamaURL) + remote, err := url.Parse(os.Getenv("OLLAMA_URL")) if err != nil { panic(err) }