Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

Commit 60ad086

Browse files
author
Alan Shaw
committed
Merge branch 'main' of github.com:web3-storage/go-w3s-client
2 parents 429384d + 46beb59 commit 60ad086

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
A client to the Web3.Storage API.
44

5+
Demo: https://youtu.be/FLsQZ_ogeOg
6+
57
## Install
68

79
```sh
@@ -38,7 +40,10 @@ func main() {
3840
fmt.Printf("https://%v.ipfs.dweb.link\n", cid)
3941

4042
// Retrieve a file/directory
41-
f, fsys, _ := c.Get(context.Background(), cid)
43+
res, _ := c.Get(context.Background(), cid)
44+
45+
// res is a http.Response with an extra method for reading IPFS UnixFS files!
46+
f, fsys, _ := res.Files()
4247

4348
// List directory entries
4449
if d, ok := f.(fs.ReadDirFile); ok {

0 commit comments

Comments
 (0)