Skip to content

Commit

Permalink
remove unnecessary local variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ili16 committed Jan 4, 2024
1 parent 1ed07df commit 472d80b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
//
Expand All @@ -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)
}
Expand Down

0 comments on commit 472d80b

Please sign in to comment.