Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Latest commit

 

History

History
43 lines (28 loc) · 1.26 KB

README.md

File metadata and controls

43 lines (28 loc) · 1.26 KB

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