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

all: gofmt -s #7900

Merged
merged 3 commits into from
Feb 9, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions assets/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions core/commands/pin/pin.go
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ func pinVerify(ctx context.Context, n *core.IpfsNode, opts pinVerifyOpts, enc ci
if err := verifcid.ValidateCid(root); err != nil {
status := PinStatus{Ok: false}
if opts.explain {
status.BadNodes = []BadNode{BadNode{Cid: enc.Encode(key), Err: err.Error()}}
status.BadNodes = []BadNode{{Cid: enc.Encode(key), Err: err.Error()}}
}
visited[key] = status
return status
Expand All @@ -692,7 +692,7 @@ func pinVerify(ctx context.Context, n *core.IpfsNode, opts pinVerifyOpts, enc ci
if err != nil {
status := PinStatus{Ok: false}
if opts.explain {
status.BadNodes = []BadNode{BadNode{Cid: enc.Encode(key), Err: err.Error()}}
status.BadNodes = []BadNode{{Cid: enc.Encode(key), Err: err.Error()}}
}
visited[key] = status
return status
Expand Down
2 changes: 1 addition & 1 deletion core/commands/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ var VersionROCmd = &cmds.Command{}
var rootROSubcommands = map[string]*cmds.Command{
"commands": CommandsDaemonROCmd,
"cat": CatCmd,
"block": &cmds.Command{
"block": {
Subcommands: map[string]*cmds.Command{
"stat": blockStatCmd,
"get": blockGetCmd,
Expand Down
2 changes: 1 addition & 1 deletion namesys/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package namesys
import (
"context"
"errors"
"fmt"
"net"
"strings"
"fmt"

path "github.com/ipfs/go-path"
opts "github.com/ipfs/interface-go-ipfs-core/options/namesys"
Expand Down
44 changes: 22 additions & 22 deletions namesys/dns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,72 +61,72 @@ func TestDnsEntryParsing(t *testing.T) {
func newMockDNS() *mockDNS {
return &mockDNS{
entries: map[string][]string{
"multihash.example.com.": []string{
"multihash.example.com.": {
"dnslink=QmY3hE8xgFCjGcz6PHgnvJz5HZi1BaKRfPkn1ghZUcYMjD",
},
"ipfs.example.com.": []string{
"ipfs.example.com.": {
"dnslink=/ipfs/QmY3hE8xgFCjGcz6PHgnvJz5HZi1BaKRfPkn1ghZUcYMjD",
},
"_dnslink.dipfs.example.com.": []string{
"_dnslink.dipfs.example.com.": {
"dnslink=/ipfs/QmY3hE8xgFCjGcz6PHgnvJz5HZi1BaKRfPkn1ghZUcYMjD",
},
"dns1.example.com.": []string{
"dns1.example.com.": {
"dnslink=/ipns/ipfs.example.com",
},
"dns2.example.com.": []string{
"dns2.example.com.": {
"dnslink=/ipns/dns1.example.com",
},
"multi.example.com.": []string{
"multi.example.com.": {
"some stuff",
"dnslink=/ipns/dns1.example.com",
"masked dnslink=/ipns/example.invalid",
},
"equals.example.com.": []string{
"equals.example.com.": {
"dnslink=/ipfs/QmY3hE8xgFCjGcz6PHgnvJz5HZi1BaKRfPkn1ghZUcYMjD/=equals",
},
"loop1.example.com.": []string{
"loop1.example.com.": {
"dnslink=/ipns/loop2.example.com",
},
"loop2.example.com.": []string{
"loop2.example.com.": {
"dnslink=/ipns/loop1.example.com",
},
"_dnslink.dloop1.example.com.": []string{
"_dnslink.dloop1.example.com.": {
"dnslink=/ipns/loop2.example.com",
},
"_dnslink.dloop2.example.com.": []string{
"_dnslink.dloop2.example.com.": {
"dnslink=/ipns/loop1.example.com",
},
"bad.example.com.": []string{
"bad.example.com.": {
"dnslink=",
},
"withsegment.example.com.": []string{
"withsegment.example.com.": {
"dnslink=/ipfs/QmY3hE8xgFCjGcz6PHgnvJz5HZi1BaKRfPkn1ghZUcYMjD/sub/segment",
},
"withrecsegment.example.com.": []string{
"withrecsegment.example.com.": {
"dnslink=/ipns/withsegment.example.com/subsub",
},
"withtrailing.example.com.": []string{
"withtrailing.example.com.": {
"dnslink=/ipfs/QmY3hE8xgFCjGcz6PHgnvJz5HZi1BaKRfPkn1ghZUcYMjD/sub/",
},
"withtrailingrec.example.com.": []string{
"withtrailingrec.example.com.": {
"dnslink=/ipns/withtrailing.example.com/segment/",
},
"double.example.com.": []string{
"double.example.com.": {
"dnslink=/ipfs/QmY3hE8xgFCjGcz6PHgnvJz5HZi1BaKRfPkn1ghZUcYMjD",
},
"_dnslink.double.example.com.": []string{
"_dnslink.double.example.com.": {
"dnslink=/ipfs/QmY3hE8xgFCjGcz6PHgnvJz5HZi1BaKRfPkn1ghZUcYMjD",
},
"double.conflict.com.": []string{
"double.conflict.com.": {
"dnslink=/ipfs/QmY3hE8xgFCjGcz6PHgnvJz5HZi1BaKRfPkn1ghZUcYMjD",
},
"_dnslink.conflict.example.com.": []string{
"_dnslink.conflict.example.com.": {
"dnslink=/ipfs/QmY3hE8xgFCjGcz6PHgnvJz5HZi1BaKRfPkn1ghZUcYMjE",
},
"fqdn.example.com.": []string{
"fqdn.example.com.": {
"dnslink=/ipfs/QmYvMB9yrsSf7RKBghkfwmHJkzJhW2ZgVwq3LxBXXPasFr",
},
"www.wealdtech.eth.link.": []string{
"www.wealdtech.eth.link.": {
"dnslink=/ipns/ipfs.example.com",
},
},
Expand Down