https://github.com/miguelmota/go-ipfsutil
Utility functions for interfacing with the IPFS CLI
https://github.com/miguelmota/go-ipfsutil
cli golang ipfs shell utility
Last synced: 5 months ago
JSON representation
Utility functions for interfacing with the IPFS CLI
- Host: GitHub
- URL: https://github.com/miguelmota/go-ipfsutil
- Owner: miguelmota
- License: mit
- Archived: true
- Created: 2018-10-06T20:56:41.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-06T21:20:16.000Z (over 7 years ago)
- Last Synced: 2024-11-15T22:19:58.559Z (over 1 year ago)
- Topics: cli, golang, ipfs, shell, utility
- Language: Go
- Homepage: https://github.com/miguelmota/go-ipfsutil
- Size: 4.88 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# go-ipfsutil
> Utilities functions for interfacing with the IPFS CLI
[](https://raw.githubusercontent.com/miguelmota/go-ipfsutil/master/LICENSE.md) [](https://travis-ci.org/miguelmota/go-ipfsutil) [](https://goreportcard.com/report/github.com/miguelmota/go-ipfsutil) [](https://godoc.org/github.com/miguelmota/go-ipfsutil)
## Why?
I needed a simple wrapper around the CLI but the existing [go-ipfs-api](https://github.com/ipfs/go-ipfs-api) package requires the daemon to be running which is not required for certain operations and [go-ipfs](https://github.com/ipfs/go-ipfs) requires too much set up.
## Getting started
```go
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](ipfsutil_test.go) for more examples
## Test
```bash
make test
```
## License
MIT