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 (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -35,6 +34,6 @@ func WriteString(w http.ResponseWriter, format string, data []interface{}) (err
|
||||||
_, err = fmt.Fprintf(w, format, data...)
|
_, err = fmt.Fprintf(w, format, data...)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
_, err = io.WriteString(w, format)
|
_, err = w.Write([]byte(format))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue