golint on core/commands
rht committed
Jun 3, 2015 at 18:44 UTC
f239a38fbb5da7b8fb9c6966ea5df205cc3aa87b
3 files changed
+3
-5
core/commands/ls.go
+1
-1
@@ -64,7 +64,7 @@ it contains, with the following format:
64
65
paths := req.Arguments()
66
67
- dagnodes := make([]*merkledag.Node, 0)
67
+ var dagnodes []*merkledag.Node
68
for _, fpath := range paths {
69
dagnode, err := core.Resolve(req.Context().Context, node, path.Path(fpath))
70
if err != nil {
core/commands/mount_unix.go
+1
-2
@@ -223,9 +223,8 @@ func doMount(node *core.IpfsNode, fsdir, nsdir string) error {
223
224
if err1 != nil {
225
return fmtFuseErr(err1)
226
- } else {
227
- return fmtFuseErr(err2)
226
}
227
+ return fmtFuseErr(err2)
228
}
229
230
// setup node state, so that it can be cancelled
core/commands/refs.go
+1
-2
@@ -222,9 +222,8 @@ type RefWriter struct {
222
func (rw *RefWriter) WriteRefs(n *dag.Node) (int, error) {
223
if rw.Recursive {
224
return rw.writeRefsRecursive(n)
225
- } else {
226
- return rw.writeRefsSingle(n)
225
}
226
+ return rw.writeRefsSingle(n)
227
}
228
229
func (rw *RefWriter) writeRefsRecursive(n *dag.Node) (int, error) {