run gofmt -s
This commit is contained in:
parent
252fd257d4
commit
218f33bc62
|
@ -73,14 +73,14 @@ func TestCatchDuplicateTransportsMuxer(t *testing.T) {
|
|||
}{
|
||||
"no duplicate transports": {
|
||||
h: h,
|
||||
transports: []MsMuxC{MsMuxC{yamuxMuxer, "yamux"}},
|
||||
transports: []MsMuxC{{yamuxMuxer, "yamux"}},
|
||||
expectedError: "",
|
||||
},
|
||||
"duplicate transports": {
|
||||
h: h,
|
||||
transports: []MsMuxC{
|
||||
MsMuxC{yamuxMuxer, "yamux"},
|
||||
MsMuxC{yamuxMuxer, "yamux"},
|
||||
{yamuxMuxer, "yamux"},
|
||||
{yamuxMuxer, "yamux"},
|
||||
},
|
||||
expectedError: "duplicate muxer transport: yamux",
|
||||
},
|
||||
|
|
|
@ -558,7 +558,7 @@ func TestAddrResolution(t *testing.T) {
|
|||
p2paddr3 := ma.StringCast("/ip4/192.0.2.1/tcp/123/p2p/" + p2.Pretty())
|
||||
|
||||
backend := &madns.MockResolver{
|
||||
TXT: map[string][]string{"_dnsaddr.example.com": []string{
|
||||
TXT: map[string][]string{"_dnsaddr.example.com": {
|
||||
"dnsaddr=" + p2paddr2.String(), "dnsaddr=" + p2paddr3.String(),
|
||||
}},
|
||||
}
|
||||
|
@ -607,14 +607,14 @@ func TestAddrResolutionRecursive(t *testing.T) {
|
|||
|
||||
backend := &madns.MockResolver{
|
||||
TXT: map[string][]string{
|
||||
"_dnsaddr.example.com": []string{
|
||||
"_dnsaddr.example.com": {
|
||||
"dnsaddr=" + p2paddr1i.String(),
|
||||
"dnsaddr=" + p2paddr2i.String(),
|
||||
},
|
||||
"_dnsaddr.foo.example.com": []string{
|
||||
"_dnsaddr.foo.example.com": {
|
||||
"dnsaddr=" + p2paddr1f.String(),
|
||||
},
|
||||
"_dnsaddr.bar.example.com": []string{
|
||||
"_dnsaddr.bar.example.com": {
|
||||
"dnsaddr=" + p2paddr2i.String(),
|
||||
},
|
||||
},
|
||||
|
|
|
@ -131,8 +131,8 @@ func (nmgr *natManager) sync() {
|
|||
// new mappings.
|
||||
func (nmgr *natManager) doSync() {
|
||||
ports := map[string]map[int]bool{
|
||||
"tcp": map[int]bool{},
|
||||
"udp": map[int]bool{},
|
||||
"tcp": {},
|
||||
"udp": {},
|
||||
}
|
||||
for _, maddr := range nmgr.net.ListenAddresses() {
|
||||
// Strip the IP
|
||||
|
|
Loading…
Reference in New Issue