Skip to content

Commit

Permalink
Replace fmt by strconv.FormatInt
Browse files Browse the repository at this point in the history
  • Loading branch information
jclebreton committed May 8, 2018
1 parent 86bf6f6 commit 29d10de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions render/reader.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package render

import (
"fmt"
"io"
"net/http"
"strconv"
)

type Reader struct {
Expand All @@ -16,7 +16,7 @@ type Reader struct {
// Render (Reader) writes data with custom ContentType and headers.
func (r Reader) Render(w http.ResponseWriter) (err error) {
r.WriteContentType(w)
r.Headers["Content-Length"] = fmt.Sprintf("%d", r.ContentLength)
r.Headers["Content-Length"] = strconv.FormatInt(r.ContentLength, 10)
r.writeHeaders(w, r.Headers)
_, err = io.Copy(w, r.Reader)
return
Expand Down

0 comments on commit 29d10de

Please sign in to comment.