We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0dbb246 commit 484691bCopy full SHA for 484691b
services/context/base.go
@@ -141,7 +141,9 @@ func (b *Base) JSON(status int, content any) {
141
func (b *Base) HTMLString(status int, html string) {
142
b.Resp.Header().Set("Content-Type", "text/html;charset=utf-8")
143
b.Resp.WriteHeader(status)
144
- b.Resp.Write([]byte(html))
+ if _, err := b.Resp.Write([]byte(html)); err != nil {
145
+ log.Error("Render HTMLString failed: %v", err)
146
+ }
147
}
148
149
// RemoteAddr returns the client machine ip address
0 commit comments