chore: add some annotations (#1544)
ref: #1075 because I am not a native English, maybe have a bit problem.
This commit is contained in:
@@ -6,6 +6,7 @@ package render
|
||||
|
||||
import "net/http"
|
||||
|
||||
// Data contains ContentType and bytes data.
|
||||
type Data struct {
|
||||
ContentType string
|
||||
Data []byte
|
||||
@@ -18,6 +19,7 @@ func (r Data) Render(w http.ResponseWriter) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
// WriteContentType (Data) writes custom ContentType.
|
||||
func (r Data) WriteContentType(w http.ResponseWriter) {
|
||||
writeContentType(w, []string{r.ContentType})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user