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

Commit eb076ad

Browse files
author
Alan Shaw
authored
fix: demo
1 parent c3cd573 commit eb076ad

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ func main() {
3838
fmt.Printf("https://%v.ipfs.dweb.link\n", cid)
3939

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

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

0 commit comments

Comments
 (0)