Skip to content

Commit

Permalink
Fix files.go so it is its own package.
Browse files Browse the repository at this point in the history
DONT'T USE, IMPORT CYCLE

import cycle not allowed
package github.com/ipfs/go-ipfs/cmd/ipfs
        imports github.com/ipfs/go-ipfs/core/commands
        imports github.com/ipfs/go-ipfs/core/commands/files
        imports github.com/ipfs/go-ipfs/core/commands
cmd/ipfs/Rules.mk:22: recipe for target 'cmd/ipfs/ipfs' failed

License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
  • Loading branch information
kevina committed Feb 1, 2018
1 parent 7538f25 commit 554752c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 31 deletions.
29 changes: 0 additions & 29 deletions core/commands/files/env.go

This file was deleted.

6 changes: 4 additions & 2 deletions core/commands/files/files.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package commands
package commands_files

import (
"bytes"
Expand All @@ -12,8 +12,10 @@ import (

bservice "github.com/ipfs/go-ipfs/blockservice"
oldcmds "github.com/ipfs/go-ipfs/commands"

lgc "github.com/ipfs/go-ipfs/commands/legacy"
core "github.com/ipfs/go-ipfs/core"
c "github.com/ipfs/go-ipfs/core/commands"
e "github.com/ipfs/go-ipfs/core/commands/e"
"github.com/ipfs/go-ipfs/exchange/offline"
dag "github.com/ipfs/go-ipfs/merkledag"
Expand Down Expand Up @@ -111,7 +113,7 @@ var filesStatCmd = &cmds.Command{
res.SetError(err, cmdkit.ErrClient)
}

node, err := GetNode(env)
node, err := c.GetNode(env)
if err != nil {
res.SetError(err, cmdkit.ErrNormal)
return
Expand Down

0 comments on commit 554752c

Please sign in to comment.