1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-28 00:39:31 +08:00

cmds: go fmt and minor cleanup

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
This commit is contained in:
Steven Allen
2018-08-22 09:27:26 -07:00
parent b0c480acf5
commit faf7aac940
2 changed files with 6 additions and 6 deletions

View File

@ -2,6 +2,7 @@ package name
import (
"errors"
"fmt"
"io"
"strings"
"time"
@ -16,7 +17,6 @@ import (
"gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit"
offline "gx/ipfs/Qmd45r5jHr1PKMNQqifnbZy1ZQwHdtXUDJFamUEvUJE544/go-ipfs-routing/offline"
path "gx/ipfs/QmdMPBephdLYNESkruDX2hcDTgFYhoCt4LimWhgnomSdV2/go-path"
"fmt"
)
var log = logging.Logger("core/commands/ipns")
@ -162,7 +162,7 @@ Resolve the value of a dnslink:
if !ok {
return e.TypeErr(output, v)
}
_, err := fmt.Fprintln(w, []byte(output.Path.String()))
_, err := fmt.Fprintln(w, output.Path)
return err
}),
},

View File

@ -2,6 +2,7 @@ package name
import (
"errors"
"fmt"
"io"
"strings"
@ -12,7 +13,6 @@ import (
"gx/ipfs/QmQsErDt8Qgw1XrsXf2BpEzDgGWtB1YLsTAARBup5b6B9W/go-libp2p-peer"
"gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit"
"gx/ipfs/QmdHb9aBELnQKTVhvvA3hsQbRgUAwsWUzBP2vZ6Y5FBYvE/go-libp2p-record"
"fmt"
)
type ipnsPubsubState struct {
@ -72,7 +72,7 @@ var ipnspsStateCmd = &cmds.Command{
state = "disabled"
}
_, err := fmt.Fprintln(w, []byte(state))
_, err := fmt.Fprintln(w, state)
return err
}),
},
@ -161,7 +161,7 @@ var ipnspsCancelCmd = &cmds.Command{
state = "no subscription"
}
_, err := fmt.Fprintln(w, []byte(state))
_, err := fmt.Fprintln(w, state)
return err
}),
},
@ -175,7 +175,7 @@ func stringListMarshaler() cmds.EncoderFunc {
}
for _, s := range list.Strings {
_, err := fmt.Fprintln(w, []byte(s))
_, err := fmt.Fprintln(w, s)
if err != nil {
return err
}