Commit d104ff8d authored by Abhishek Upperwal's avatar Abhishek Upperwal
Browse files

making go fmt happy

parent f82d4ec6
...@@ -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. // DefaultMuxers 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,
}, },
} }
......
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