Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync: run go mod tidy (and set Go 1.15) and gofmt -s in copy workflow #146

Merged
merged 2 commits into from Apr 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
@@ -1,6 +1,6 @@
module github.com/multiformats/go-multiaddr

go 1.13
go 1.15

require (
github.com/ipfs/go-cid v0.0.7
Expand Down
12 changes: 6 additions & 6 deletions multiaddr_test.go
Expand Up @@ -346,12 +346,12 @@ func TestProtocols(t *testing.T) {
func TestProtocolsWithString(t *testing.T) {
pwn := ProtocolWithName
good := map[string][]Protocol{
"/ip4": []Protocol{pwn("ip4")},
"/ip4/tcp": []Protocol{pwn("ip4"), pwn("tcp")},
"ip4/tcp/udp/ip6": []Protocol{pwn("ip4"), pwn("tcp"), pwn("udp"), pwn("ip6")},
"////////ip4/tcp": []Protocol{pwn("ip4"), pwn("tcp")},
"ip4/udp/////////": []Protocol{pwn("ip4"), pwn("udp")},
"////////ip4/tcp////////": []Protocol{pwn("ip4"), pwn("tcp")},
"/ip4": {pwn("ip4")},
"/ip4/tcp": {pwn("ip4"), pwn("tcp")},
"ip4/tcp/udp/ip6": {pwn("ip4"), pwn("tcp"), pwn("udp"), pwn("ip6")},
"////////ip4/tcp": {pwn("ip4"), pwn("tcp")},
"ip4/udp/////////": {pwn("ip4"), pwn("udp")},
"////////ip4/tcp////////": {pwn("ip4"), pwn("tcp")},
}

for s, ps1 := range good {
Expand Down
16 changes: 8 additions & 8 deletions util_test.go
Expand Up @@ -12,10 +12,10 @@ func TestSplitFirstLast(t *testing.T) {
ipfsStr := "/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7"

for _, x := range [][]string{
[]string{ipStr, tcpStr, quicStr, ipfsStr},
[]string{ipStr, tcpStr, ipfsStr},
[]string{ipStr, tcpStr},
[]string{ipStr},
{ipStr, tcpStr, quicStr, ipfsStr},
{ipStr, tcpStr, ipfsStr},
{ipStr, tcpStr},
{ipStr},
} {
addr := StringCast(strings.Join(x, ""))
head, tail := SplitFirst(addr)
Expand Down Expand Up @@ -110,10 +110,10 @@ func TestSplitFunc(t *testing.T) {
ipfsStr := "/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7"

for _, x := range [][]string{
[]string{ipStr, tcpStr, quicStr, ipfsStr},
[]string{ipStr, tcpStr, ipfsStr},
[]string{ipStr, tcpStr},
[]string{ipStr},
{ipStr, tcpStr, quicStr, ipfsStr},
{ipStr, tcpStr, ipfsStr},
{ipStr, tcpStr},
{ipStr},
} {
addr := StringCast(strings.Join(x, ""))
for i, cs := range x {
Expand Down