1 parent
fca32c2233
commit
7f0e5b7b10
8 files changed
+21
-105
No files matched your search
+2
-2
@@ -2,6 +2,7 @@ package api
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
"up/utils"
|
||||
@@ -26,7 +27,6 @@ func ExtlinuxRead(w http.ResponseWriter, req *http.Request) {
|
||||
}
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
if err := json.NewEncoder(w).Encode(response); err != nil {
|
||||
// В случае ошибки кодирования уже ничего не сделать,
|
||||
// можно только залогировать (здесь опущено для краткости)
|
||||
fmt.Errorf("Encoding error: %v", err)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user