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()
|
||||
|
||||
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)
|
||||
if err != nil {
|
||||
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["alt"] = req.FormValue("text") + "icon"
|
||||
newService["key"] = uuid.New().String()
|
||||
fmt.Println(newService)
|
||||
allservices := ReadServicesFile()
|
||||
var allservicesmap []map[string]any
|
||||
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)
|
||||
return
|
||||
}
|
||||
fmt.Println(string(data))
|
||||
os.WriteFile(os.Getenv("SERVICES_FILE"), data, 4755)
|
||||
fmt.Fprint(w, string(data))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user