Skip to content

Commit

Permalink
Remove unnecessary code in writeBytesKey
Browse files Browse the repository at this point in the history
  • Loading branch information
jjeffery committed Jan 23, 2017
1 parent ef96621 commit cf4da72
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions logfmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,8 @@ func writeBytesKey(buf *bytes.Buffer, b []byte) {
buf.Write(bytesNull)
return
}
index := bytes.IndexFunc(b, invalidKey)
if index < 0 {
buf.Write(b)
return
}
if index > 0 {
buf.Write(b[0:index])
b = b[index:]
}
for {
index = bytes.IndexFunc(b, invalidKey)
index := bytes.IndexFunc(b, invalidKey)
if index < 0 {
break
}
Expand Down

0 comments on commit cf4da72

Please sign in to comment.