Skip to content

Commit

Permalink
don't put the buffer struct on the heap
Browse files Browse the repository at this point in the history
This showed up when profile go-ipfs.
  • Loading branch information
Stebalien committed Oct 2, 2018
1 parent 2e9c819 commit 7989a08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func stringToBytes(s string) ([]byte, error) {
// consume trailing slashes
s = strings.TrimRight(s, "/")

b := new(bytes.Buffer)
var b bytes.Buffer
sp := strings.Split(s, "/")

if sp[0] != "" {
Expand Down

0 comments on commit 7989a08

Please sign in to comment.