Utility functions for interfacing with the IPFS CLI
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
.gitignore
.travis.yml
LICENSE.md
Makefile
README.md
ipfsutil.go
ipfsutil_test.go

README.md

go-ipfsutil

Utilities functions for interfacing with the IPFS CLI

License Build Status Go Report Card GoDoc

Why?

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.

Getting started

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

Test

make test

License

MIT