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:
18
core/commands/resolve.go
Normal file
18
core/commands/resolve.go
Normal 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
|
||||
}
|
Reference in New Issue
Block a user