- commit
- b864754c1f71fc501d8b105a4cb61b7957100491
- parent
- 84069757250185aaa5cbf5f6e89ef22260526466
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2020-07-16 06:37
rm redundant path from log
Diffstat
| M | via.go | 6 | +++--- |
1 files changed, 3 insertions, 3 deletions
diff --git a/via.go b/via.go
@@ -170,7 +170,7 @@ func putStore(w http.ResponseWriter, r *http.Request) {
170 170
171 171 err = ioutil.WriteFile(path, content, 0644)
172 172 if err != nil {
173 -1 log.Println("error writing to file:", path, err)
-1 173 log.Println("error writing to file:", err)
174 174 http.Error(w, "Internal Server Error", http.StatusInternalServerError)
175 175 return
176 176 }
@@ -184,7 +184,7 @@ func getStore(w http.ResponseWriter, r *http.Request) {
184 184 http.Error(w, "Not Found", http.StatusNotFound)
185 185 return
186 186 } else if err != nil {
187 -1 log.Println("error reading from file:", path, err)
-1 187 log.Println("error reading from file:", err)
188 188 http.Error(w, "Internal Server Error", http.StatusInternalServerError)
189 189 return
190 190 }
@@ -200,7 +200,7 @@ func deleteStore(w http.ResponseWriter, r *http.Request) {
200 200 http.Error(w, "Not Found", http.StatusNotFound)
201 201 return
202 202 } else if err != nil {
203 -1 log.Println("error removing file:", path, err)
-1 203 log.Println("error removing file:", err)
204 204 http.Error(w, "Internal Server Error", http.StatusInternalServerError)
205 205 return
206 206 }