Utilities functions for interfacing with the IPFS CLI
I needed a simple wrapper around the CLI but the existing go-ipfs-api package requires the daemon to be running which is not required for certain operations and go-ipfs requires too much set up.
package main
import (
"fmt"
"log"
"github.com/miguelmota/go-ipfsutil"
)
func main() {
hash, err := ipfsutil.AddBytes([]byte("hello world"))
if err != nil {
log.Fatal(err)
}
fmt.Println(hash) // Qmf412jQZiuVUtdgnB36FXFX7xg5V6KEbSJ4dpQuhkLyfD
}
Check out the tests for more examples
make test
MIT