Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mf
go-multiaddr
Commits
7989a080
Commit
7989a080
authored
Oct 01, 2018
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't put the buffer struct on the heap
This showed up when profile go-ipfs.
parent
2e9c819c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
codec.go
codec.go
+1
-1
No files found.
codec.go
View file @
7989a080
...
@@ -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
]
!=
""
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment