Skip to content

Commit

Permalink
get rid of some unnecessary copies
Browse files Browse the repository at this point in the history
  • Loading branch information
jtolio committed Jan 12, 2017
1 parent 6d0cd4e commit ee28162
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions whgls/gls.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ func SetLogOutput(
ctx := whcompat.Context(r)

if rid, ok := ctx.Value(whmon.RequestId).(int64); ok {
logger(whcompat.Context(r), "[R:%d] %s", rid, string(p))
logger(whcompat.Context(r), "[R:%d] %s", rid, p)
} else {
// what if p has some format specifiers in it? we need to use "%s" as the
// format string.
logger(whcompat.Context(r), "%s", string(p))
logger(whcompat.Context(r), "%s", p)
}

return len(p), nil
Expand Down

0 comments on commit ee28162

Please sign in to comment.