refactor: Remove unnecessary type conversions (#772)

This commit is contained in:
Bo-Yi Wu 2017-01-27 23:03:32 +08:00 committed by Lunny Xiao
parent 4faf097fb9
commit 25663b5816
4 changed files with 5 additions and 5 deletions

View file

@ -132,7 +132,7 @@ func GetContentHandler(ctx *context.Context) {
if match != nil && len(match) > 1 {
statusCode = 206
fromByte, _ = strconv.ParseInt(match[1], 10, 32)
ctx.Resp.Header().Set("Content-Range", fmt.Sprintf("bytes %d-%d/%d", fromByte, meta.Size-1, int64(meta.Size)-fromByte))
ctx.Resp.Header().Set("Content-Range", fmt.Sprintf("bytes %d-%d/%d", fromByte, meta.Size-1, meta.Size-fromByte))
}
}