Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
faf7aac9
Commit
faf7aac9
authored
Aug 22, 2018
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmds: go fmt and minor cleanup
License: MIT Signed-off-by:
Steven Allen
<
steven@stebalien.com
>
parent
b0c480ac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
core/commands/name/ipns.go
core/commands/name/ipns.go
+2
-2
core/commands/name/ipnsps.go
core/commands/name/ipnsps.go
+4
-4
No files found.
core/commands/name/ipns.go
View file @
faf7aac9
...
@@ -2,6 +2,7 @@ package name
...
@@ -2,6 +2,7 @@ package name
import
(
import
(
"errors"
"errors"
"fmt"
"io"
"io"
"strings"
"strings"
"time"
"time"
...
@@ -16,7 +17,6 @@ import (
...
@@ -16,7 +17,6 @@ import (
"gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit"
"gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit"
offline
"gx/ipfs/Qmd45r5jHr1PKMNQqifnbZy1ZQwHdtXUDJFamUEvUJE544/go-ipfs-routing/offline"
offline
"gx/ipfs/Qmd45r5jHr1PKMNQqifnbZy1ZQwHdtXUDJFamUEvUJE544/go-ipfs-routing/offline"
path
"gx/ipfs/QmdMPBephdLYNESkruDX2hcDTgFYhoCt4LimWhgnomSdV2/go-path"
path
"gx/ipfs/QmdMPBephdLYNESkruDX2hcDTgFYhoCt4LimWhgnomSdV2/go-path"
"fmt"
)
)
var
log
=
logging
.
Logger
(
"core/commands/ipns"
)
var
log
=
logging
.
Logger
(
"core/commands/ipns"
)
...
@@ -162,7 +162,7 @@ Resolve the value of a dnslink:
...
@@ -162,7 +162,7 @@ Resolve the value of a dnslink:
if
!
ok
{
if
!
ok
{
return
e
.
TypeErr
(
output
,
v
)
return
e
.
TypeErr
(
output
,
v
)
}
}
_
,
err
:=
fmt
.
Fprintln
(
w
,
[]
byte
(
output
.
Path
.
String
())
)
_
,
err
:=
fmt
.
Fprintln
(
w
,
output
.
Path
)
return
err
return
err
}),
}),
},
},
...
...
core/commands/name/ipnsps.go
View file @
faf7aac9
...
@@ -2,6 +2,7 @@ package name
...
@@ -2,6 +2,7 @@ package name
import
(
import
(
"errors"
"errors"
"fmt"
"io"
"io"
"strings"
"strings"
...
@@ -12,7 +13,6 @@ import (
...
@@ -12,7 +13,6 @@ import (
"gx/ipfs/QmQsErDt8Qgw1XrsXf2BpEzDgGWtB1YLsTAARBup5b6B9W/go-libp2p-peer"
"gx/ipfs/QmQsErDt8Qgw1XrsXf2BpEzDgGWtB1YLsTAARBup5b6B9W/go-libp2p-peer"
"gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit"
"gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit"
"gx/ipfs/QmdHb9aBELnQKTVhvvA3hsQbRgUAwsWUzBP2vZ6Y5FBYvE/go-libp2p-record"
"gx/ipfs/QmdHb9aBELnQKTVhvvA3hsQbRgUAwsWUzBP2vZ6Y5FBYvE/go-libp2p-record"
"fmt"
)
)
type
ipnsPubsubState
struct
{
type
ipnsPubsubState
struct
{
...
@@ -72,7 +72,7 @@ var ipnspsStateCmd = &cmds.Command{
...
@@ -72,7 +72,7 @@ var ipnspsStateCmd = &cmds.Command{
state
=
"disabled"
state
=
"disabled"
}
}
_
,
err
:=
fmt
.
Fprintln
(
w
,
[]
byte
(
state
)
)
_
,
err
:=
fmt
.
Fprintln
(
w
,
state
)
return
err
return
err
}),
}),
},
},
...
@@ -161,7 +161,7 @@ var ipnspsCancelCmd = &cmds.Command{
...
@@ -161,7 +161,7 @@ var ipnspsCancelCmd = &cmds.Command{
state
=
"no subscription"
state
=
"no subscription"
}
}
_
,
err
:=
fmt
.
Fprintln
(
w
,
[]
byte
(
state
)
)
_
,
err
:=
fmt
.
Fprintln
(
w
,
state
)
return
err
return
err
}),
}),
},
},
...
@@ -175,7 +175,7 @@ func stringListMarshaler() cmds.EncoderFunc {
...
@@ -175,7 +175,7 @@ func stringListMarshaler() cmds.EncoderFunc {
}
}
for
_
,
s
:=
range
list
.
Strings
{
for
_
,
s
:=
range
list
.
Strings
{
_
,
err
:=
fmt
.
Fprintln
(
w
,
[]
byte
(
s
)
)
_
,
err
:=
fmt
.
Fprintln
(
w
,
s
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment