Skip to content

Commit

Permalink
Merge pull request #42 from tupyy/fix-lint
Browse files Browse the repository at this point in the history
agent/fileserver: Fix lint errcheck
  • Loading branch information
tupyy authored Oct 16, 2024
2 parents e8e6f0f + 5ae9414 commit 413775b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/agent/fileserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ func handleGetLogin(log *log.PrefixLogger, wwwDir string) http.HandlerFunc {

w.Header().Set("Content-Type", "text/html")
w.Header().Set("Content-Length", strconv.Itoa(len(file)))
w.Write(file)
if _, err := w.Write(file); err != nil {
log.Warnf("Failed writing the content of %s", pathToIndeHtml)
}
}
}

0 comments on commit 413775b

Please sign in to comment.