chore: improve render string performance (#2365)

This commit is contained in:
Bo-Yi Wu 2020-05-09 17:41:00 +08:00 committed by GitHub
parent 82b284fd77
commit 6f3d96ccff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -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
}