Commit faf7aac9 authored by Steven Allen's avatar Steven Allen

cmds: go fmt and minor cleanup

License: MIT
Signed-off-by: default avatarSteven Allen <steven@stebalien.com>
parent b0c480ac
...@@ -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
}), }),
}, },
......
...@@ -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
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment