Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
go-libp2p
Commits
d104ff8d
Commit
d104ff8d
authored
Jul 25, 2018
by
Abhishek Upperwal
Browse files
making go fmt happy
parent
f82d4ec6
Changes
1
Hide whitespace changes
Inline
Side-by-side
defaults.go
View file @
d104ff8d
...
@@ -21,7 +21,7 @@ import (
...
@@ -21,7 +21,7 @@ import (
// security protocols.
// security protocols.
var
DefaultSecurity
=
Security
(
secio
.
ID
,
secio
.
New
)
var
DefaultSecurity
=
Security
(
secio
.
ID
,
secio
.
New
)
// DefaultMuxer configures libp2p to use the stream connection multiplexers.
// DefaultMuxer
s
configures libp2p to use the stream connection multiplexers.
//
//
// Use this option when you want to *extend* the set of multiplexers used by
// Use this option when you want to *extend* the set of multiplexers used by
// libp2p instead of replacing them.
// libp2p instead of replacing them.
...
@@ -53,6 +53,7 @@ var RandomIdentity = func(cfg *Config) error {
...
@@ -53,6 +53,7 @@ var RandomIdentity = func(cfg *Config) error {
return
cfg
.
Apply
(
Identity
(
priv
))
return
cfg
.
Apply
(
Identity
(
priv
))
}
}
// DefaultListenAddrs configures libp2p to use default listen address
var
DefaultListenAddrs
=
func
(
cfg
*
Config
)
error
{
var
DefaultListenAddrs
=
func
(
cfg
*
Config
)
error
{
defaultListenAddr
,
err
:=
multiaddr
.
NewMultiaddr
(
"/ip4/0.0.0.0/tcp/0"
)
defaultListenAddr
,
err
:=
multiaddr
.
NewMultiaddr
(
"/ip4/0.0.0.0/tcp/0"
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -91,7 +92,7 @@ var defaults = []struct {
...
@@ -91,7 +92,7 @@ var defaults = []struct {
},
},
{
{
fallback
:
func
(
cfg
*
Config
)
bool
{
return
cfg
.
ListenAddrs
==
nil
},
fallback
:
func
(
cfg
*
Config
)
bool
{
return
cfg
.
ListenAddrs
==
nil
},
opt
:
DefaultListenAddrs
,
opt
:
DefaultListenAddrs
,
},
},
}
}
...
...
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