mirror of https://github.com/gin-gonic/gin.git
chore: improve render string performance (#2365)
This commit is contained in:
parent
82b284fd77
commit
6f3d96ccff
|
@ -6,7 +6,6 @@ package render
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
|
@ -35,6 +34,6 @@ func WriteString(w http.ResponseWriter, format string, data []interface{}) (err
|
|||
_, err = fmt.Fprintf(w, format, data...)
|
||||
return
|
||||
}
|
||||
_, err = io.WriteString(w, format)
|
||||
_, err = w.Write([]byte(format))
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue