all: Revert the underscore sillyness

This commit is contained in:
Jakob Borg
2019-02-02 12:16:27 +01:00
parent 9fd270d78e
commit c2ddc83509
70 changed files with 252 additions and 252 deletions

View File

@@ -965,7 +965,7 @@ func (s *apiService) postSystemShutdown(w http.ResponseWriter, r *http.Request)
}
func (s *apiService) flushResponse(resp string, w http.ResponseWriter) {
_, _ = w.Write([]byte(resp + "\n"))
w.Write([]byte(resp + "\n"))
f := w.(http.Flusher)
f.Flush()
}
@@ -1152,7 +1152,7 @@ func (s *apiService) getSupportBundle(w http.ResponseWriter, r *http.Request) {
// Serve the buffer zip to client for download
w.Header().Set("Content-Type", "application/zip")
w.Header().Set("Content-Disposition", "attachment; filename="+zipFileName)
_, _ = io.Copy(w, &zipFilesBuffer)
io.Copy(w, &zipFilesBuffer)
}
func (s *apiService) getSystemHTTPMetrics(w http.ResponseWriter, r *http.Request) {
@@ -1172,7 +1172,7 @@ func (s *apiService) getSystemHTTPMetrics(w http.ResponseWriter, r *http.Request
}
})
bs, _ := json.MarshalIndent(stats, "", " ")
_, _ = w.Write(bs)
w.Write(bs)
}
func (s *apiService) getSystemDiscovery(w http.ResponseWriter, r *http.Request) {
@@ -1464,7 +1464,7 @@ func (s *apiService) getQR(w http.ResponseWriter, r *http.Request) {
}
w.Header().Set("Content-Type", "image/png")
_, _ = w.Write(code.PNG())
w.Write(code.PNG())
}
func (s *apiService) getPeerCompletion(w http.ResponseWriter, r *http.Request) {
@@ -1562,7 +1562,7 @@ func (s *apiService) getSystemBrowse(w http.ResponseWriter, r *http.Request) {
// Default value or in case of error unmarshalling ends up being basic fs.
var fsType fs.FilesystemType
_ = fsType.UnmarshalText([]byte(qs.Get("filesystem")))
fsType.UnmarshalText([]byte(qs.Get("filesystem")))
sendJSON(w, browseFiles(current, fsType))
}
@@ -1659,7 +1659,7 @@ func (s *apiService) getHeapProf(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Disposition", "attachment; filename="+filename)
runtime.GC()
_ = pprof.WriteHeapProfile(w)
pprof.WriteHeapProfile(w)
}
func toJsonFileInfoSlice(fs []db.FileInfoTruncated) []jsonDBFileInfo {