1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-05-21 08:56:37 +08:00

writing files inside ipns works now! also implemented resolve cli command

This commit is contained in:
Jeromy
2014-09-26 12:08:00 -07:00
committed by Juan Batiz-Benet
parent 006b68b558
commit 6080944af9
14 changed files with 144 additions and 28 deletions

18
core/commands/resolve.go Normal file
View File

@ -0,0 +1,18 @@
package commands
import (
"fmt"
"io"
"github.com/jbenet/go-ipfs/core"
)
func Resolve(n *core.IpfsNode, args []string, opts map[string]interface{}, out io.Writer) error {
res, err := n.Namesys.Resolve(args[0])
if err != nil {
return err
}
fmt.Fprintf(out, "%s -> %s\n", args[0], res)
return nil
}