delete all println
This commit is contained in:
1 parent
84a3bc1e5b
commit
901696cee8
2 files changed
-6
No files matched your search
@@ -19,10 +19,6 @@ func AddService(w http.ResponseWriter, req *http.Request) {
|
|||||||
}
|
}
|
||||||
defer file.Close()
|
defer file.Close()
|
||||||
|
|
||||||
fmt.Printf("Uploaded File: %+v\n", handler.Filename)
|
|
||||||
fmt.Printf("File Size: %+v\n", handler.Size)
|
|
||||||
fmt.Printf("MIME Header: %+v\n", handler.Header)
|
|
||||||
|
|
||||||
dst, err := os.Create(os.Getenv("IMG_UPLOAD_PATH") + "/" + handler.Filename)
|
dst, err := os.Create(os.Getenv("IMG_UPLOAD_PATH") + "/" + handler.Filename)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Error creating destination file:", err)
|
fmt.Println("Error creating destination file:", err)
|
||||||
@@ -39,7 +35,6 @@ func AddService(w http.ResponseWriter, req *http.Request) {
|
|||||||
newService["text"] = req.FormValue("text")
|
newService["text"] = req.FormValue("text")
|
||||||
newService["alt"] = req.FormValue("text") + "icon"
|
newService["alt"] = req.FormValue("text") + "icon"
|
||||||
newService["key"] = uuid.New().String()
|
newService["key"] = uuid.New().String()
|
||||||
fmt.Println(newService)
|
|
||||||
allservices := ReadServicesFile()
|
allservices := ReadServicesFile()
|
||||||
var allservicesmap []map[string]any
|
var allservicesmap []map[string]any
|
||||||
err = json.Unmarshal([]byte(allservices), &allservicesmap)
|
err = json.Unmarshal([]byte(allservices), &allservicesmap)
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ func Services(w http.ResponseWriter, req *http.Request) {
|
|||||||
fmt.Fprintf(w, "Error to read body: %v", err)
|
fmt.Fprintf(w, "Error to read body: %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
fmt.Println(string(data))
|
|
||||||
os.WriteFile(os.Getenv("SERVICES_FILE"), data, 4755)
|
os.WriteFile(os.Getenv("SERVICES_FILE"), data, 4755)
|
||||||
fmt.Fprint(w, string(data))
|
fmt.Fprint(w, string(data))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user