Browse Source

Use log instead fmt

Volodymyr Tkach 2 years ago
parent
commit
ad83690be8
1 changed files with 2 additions and 3 deletions
  1. 2 3
      utils/http/helpers/helpers.go

+ 2 - 3
utils/http/helpers/helpers.go

@@ -3,7 +3,6 @@ package helpers
 import (
 	"encoding/json"
 	"errors"
-	"fmt"
 	"log"
 	"net/http"
 	"os"
@@ -97,7 +96,7 @@ func HandleAppStatus() http.Handler {
 
 		w.Header().Set("Content-Type", "application/json")
 		if _, err := w.Write(j); err != nil {
-			fmt.Printf("%s\n", err.Error())
+			log.Printf("%s\n", err.Error())
 		}
 	})
 }
@@ -110,7 +109,7 @@ func HandleFile(data, contentType string) http.Handler {
 		}
 		w.Header().Set("Content-Type", contentType)
 		if _, err := w.Write([]byte(data)); err != nil {
-			fmt.Printf("%s\n", err.Error())
+			log.Printf("%s\n", err.Error())
 		}
 	})
 }