mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-17 14:37:02 +00:00
Make it explicit when we are intentionally not checking errors
The linter complains that we're not checking for errors, but on some cases it's on code paths were it is reasonable to do so (e.g. we're closing the connection and it's a best-effort write). This patch adjusts the code to make those cases explicit.
This commit is contained in:
@@ -209,7 +209,7 @@ func initMailLog(path string) {
|
||||
if path == "<syslog>" {
|
||||
maillog.Default, err = maillog.NewSyslog()
|
||||
} else {
|
||||
os.MkdirAll(filepath.Dir(path), 0775)
|
||||
_ = os.MkdirAll(filepath.Dir(path), 0775)
|
||||
var f *os.File
|
||||
f, err = os.OpenFile(path, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0664)
|
||||
maillog.Default = maillog.New(f)
|
||||
@@ -309,7 +309,7 @@ func launchMonitoringServer(addr string) {
|
||||
|
||||
flags := dumpFlags()
|
||||
http.HandleFunc("/debug/flags", func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Write([]byte(flags))
|
||||
_, _ = w.Write([]byte(flags))
|
||||
})
|
||||
|
||||
go http.ListenAndServe(addr, nil)
|
||||
|
||||
Reference in New Issue
Block a user