* Add new function to Render interface for writing content type only * Add support for the new function in Render interface for writing content-type only * Fix unhandled merge conflict in context_test.go * Update vendor.json
This commit is contained in:
committed by
GitHub
parent
75c2274b4b
commit
963acc4b0c
+4
-1
@@ -22,9 +22,12 @@ func (r String) Render(w http.ResponseWriter) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r String) WriteContentType(w http.ResponseWriter) {
|
||||
writeContentType(w, plainContentType)
|
||||
}
|
||||
|
||||
func WriteString(w http.ResponseWriter, format string, data []interface{}) {
|
||||
writeContentType(w, plainContentType)
|
||||
|
||||
if len(data) > 0 {
|
||||
fmt.Fprintf(w, format, data...)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user