Skip to content
This repository was archived by the owner on Oct 5, 2023. It is now read-only.

Commit 65cd935

Browse files
committed
gofmt
1 parent e34cd60 commit 65cd935

File tree

6 files changed

+30
-31
lines changed

6 files changed

+30
-31
lines changed

api.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ func (api *HttpApi) WithOptions(opts ...caopts.ApiOption) (iface.CoreAPI, error)
136136

137137
func (api *HttpApi) request(command string, args ...string) *RequestBuilder {
138138
return &RequestBuilder{
139-
command: command,
140-
args: args,
141-
shell: api,
139+
command: command,
140+
args: args,
141+
shell: api,
142142
}
143143
}
144144

pin.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ func (api *PinAPI) Verify(ctx context.Context) (<-chan iface.PinStatus, error) {
132132
for {
133133
var out struct {
134134
Cid string
135-
Ok bool
135+
Ok bool
136136

137-
BadNodes []struct{
137+
BadNodes []struct {
138138
Cid string
139139
Err string
140140
}

request.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ import (
77
)
88

99
type Request struct {
10-
ApiBase string
11-
Command string
12-
Args []string
13-
Opts map[string]string
14-
Body io.Reader
15-
Headers map[string]string
10+
ApiBase string
11+
Command string
12+
Args []string
13+
Opts map[string]string
14+
Body io.Reader
15+
Headers map[string]string
1616
}
1717

1818
func NewRequest(ctx context.Context, url, command string, args ...string) *Request {
@@ -25,10 +25,10 @@ func NewRequest(ctx context.Context, url, command string, args ...string) *Reque
2525
"stream-channels": "true",
2626
}
2727
return &Request{
28-
ApiBase: url + "/api/v0",
29-
Command: command,
30-
Args: args,
31-
Opts: opts,
32-
Headers: make(map[string]string),
28+
ApiBase: url + "/api/v0",
29+
Command: command,
30+
Args: args,
31+
Opts: opts,
32+
Headers: make(map[string]string),
3333
}
3434
}

requestbuilder.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ import (
1414

1515
// RequestBuilder is an IPFS commands request builder.
1616
type RequestBuilder struct {
17-
command string
18-
args []string
19-
opts map[string]string
20-
headers map[string]string
21-
body io.Reader
17+
command string
18+
args []string
19+
opts map[string]string
20+
headers map[string]string
21+
body io.Reader
2222

2323
shell *HttpApi
2424
}

response.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ func (r *Request) Send(c *http.Client) (*Response, error) {
119119
return nil, err
120120
}
121121

122-
123122
contentType, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type"))
124123
if err != nil {
125124
return nil, err

swarm.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ func (api *SwarmAPI) Disconnect(ctx context.Context, addr multiaddr.Multiaddr) e
3333
}
3434

3535
type connInfo struct {
36-
addr multiaddr.Multiaddr
37-
peer peer.ID
36+
addr multiaddr.Multiaddr
37+
peer peer.ID
3838
latency time.Duration
39-
muxer string
39+
muxer string
4040
direction inet.Direction
4141
streams []protocol.ID
4242
}
@@ -63,11 +63,11 @@ func (c *connInfo) Streams() ([]protocol.ID, error) {
6363

6464
func (api *SwarmAPI) Peers(ctx context.Context) ([]iface.ConnectionInfo, error) {
6565
var resp struct {
66-
Peers []struct{
67-
Addr string
68-
Peer string
66+
Peers []struct {
67+
Addr string
68+
Peer string
6969
Latency time.Duration
70-
Muxer string
70+
Muxer string
7171
Direction inet.Direction
7272
Streams []struct {
7373
Protocol string
@@ -86,8 +86,8 @@ func (api *SwarmAPI) Peers(ctx context.Context) ([]iface.ConnectionInfo, error)
8686
res := make([]iface.ConnectionInfo, len(resp.Peers))
8787
for i, conn := range resp.Peers {
8888
out := &connInfo{
89-
latency: conn.Latency,
90-
muxer: conn.Muxer,
89+
latency: conn.Latency,
90+
muxer: conn.Muxer,
9191
direction: conn.Direction,
9292
}
9393

0 commit comments

Comments
 (0)