Skip to content

Commit d82dff5

Browse files
authored
sync: run go mod tidy (and set Go 1.15) and gofmt -s in copy workflow (#146)
1 parent ed75495 commit d82dff5

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/multiformats/go-multiaddr
22

3-
go 1.13
3+
go 1.15
44

55
require (
66
github.com/ipfs/go-cid v0.0.7

multiaddr_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -346,12 +346,12 @@ func TestProtocols(t *testing.T) {
346346
func TestProtocolsWithString(t *testing.T) {
347347
pwn := ProtocolWithName
348348
good := map[string][]Protocol{
349-
"/ip4": []Protocol{pwn("ip4")},
350-
"/ip4/tcp": []Protocol{pwn("ip4"), pwn("tcp")},
351-
"ip4/tcp/udp/ip6": []Protocol{pwn("ip4"), pwn("tcp"), pwn("udp"), pwn("ip6")},
352-
"////////ip4/tcp": []Protocol{pwn("ip4"), pwn("tcp")},
353-
"ip4/udp/////////": []Protocol{pwn("ip4"), pwn("udp")},
354-
"////////ip4/tcp////////": []Protocol{pwn("ip4"), pwn("tcp")},
349+
"/ip4": {pwn("ip4")},
350+
"/ip4/tcp": {pwn("ip4"), pwn("tcp")},
351+
"ip4/tcp/udp/ip6": {pwn("ip4"), pwn("tcp"), pwn("udp"), pwn("ip6")},
352+
"////////ip4/tcp": {pwn("ip4"), pwn("tcp")},
353+
"ip4/udp/////////": {pwn("ip4"), pwn("udp")},
354+
"////////ip4/tcp////////": {pwn("ip4"), pwn("tcp")},
355355
}
356356

357357
for s, ps1 := range good {

util_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ func TestSplitFirstLast(t *testing.T) {
1212
ipfsStr := "/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7"
1313

1414
for _, x := range [][]string{
15-
[]string{ipStr, tcpStr, quicStr, ipfsStr},
16-
[]string{ipStr, tcpStr, ipfsStr},
17-
[]string{ipStr, tcpStr},
18-
[]string{ipStr},
15+
{ipStr, tcpStr, quicStr, ipfsStr},
16+
{ipStr, tcpStr, ipfsStr},
17+
{ipStr, tcpStr},
18+
{ipStr},
1919
} {
2020
addr := StringCast(strings.Join(x, ""))
2121
head, tail := SplitFirst(addr)
@@ -110,10 +110,10 @@ func TestSplitFunc(t *testing.T) {
110110
ipfsStr := "/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7"
111111

112112
for _, x := range [][]string{
113-
[]string{ipStr, tcpStr, quicStr, ipfsStr},
114-
[]string{ipStr, tcpStr, ipfsStr},
115-
[]string{ipStr, tcpStr},
116-
[]string{ipStr},
113+
{ipStr, tcpStr, quicStr, ipfsStr},
114+
{ipStr, tcpStr, ipfsStr},
115+
{ipStr, tcpStr},
116+
{ipStr},
117117
} {
118118
addr := StringCast(strings.Join(x, ""))
119119
for i, cs := range x {

0 commit comments

Comments
 (0)