mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-22 04:54:30 +08:00
19 lines
295 B
Go
19 lines
295 B
Go
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\n", res)
|
|
return nil
|
|
}
|