Commit 7989a080 authored by Steven Allen's avatar Steven Allen

don't put the buffer struct on the heap

This showed up when profile go-ipfs.
parent 2e9c819c
...@@ -11,7 +11,7 @@ func stringToBytes(s string) ([]byte, error) { ...@@ -11,7 +11,7 @@ func stringToBytes(s string) ([]byte, error) {
// consume trailing slashes // consume trailing slashes
s = strings.TrimRight(s, "/") s = strings.TrimRight(s, "/")
b := new(bytes.Buffer) var b bytes.Buffer
sp := strings.Split(s, "/") sp := strings.Split(s, "/")
if sp[0] != "" { if sp[0] != "" {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment