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
b68c4a26
Commit
b68c4a26
authored
Jun 18, 2018
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go fmt
parent
84fb1056
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
protocols.go
protocols.go
+2
-2
No files found.
protocols.go
View file @
b68c4a26
...
...
@@ -3,8 +3,8 @@ package multiaddr
import
(
"encoding/binary"
"fmt"
"strings"
"math/bits"
"strings"
)
// Protocol is a Multiaddr protocol description structure.
...
...
@@ -170,7 +170,7 @@ func ProtocolsWithString(s string) ([]Protocol, error) {
// CodeToVarint converts an integer to a varint-encoded []byte
func
CodeToVarint
(
num
int
)
[]
byte
{
buf
:=
make
([]
byte
,
bits
.
Len
(
uint
(
num
))
/
7
+
1
)
buf
:=
make
([]
byte
,
bits
.
Len
(
uint
(
num
))
/
7
+
1
)
n
:=
binary
.
PutUvarint
(
buf
,
uint64
(
num
))
return
buf
[
:
n
]
}
...
...
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