Skip to content
This repository was archived by the owner on Aug 12, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions examples/api/service/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ Set up an ipfsnode.
```
func main() {
// Basic ipfsnode setup
r := fsrepo.At("~/.ipfs")
if err := r.Open(); err != nil {
r, err := fsrepo.Open("~/.ipfs")
if err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

wonder if we ought to try and make our examples work as tests somehow. (i like how go does it-- "examples" are just code that is runnable, and that godoc treats specially.) this is probably unrealistic for anything complicated though...

panic(err)
}

Expand All @@ -51,12 +51,11 @@ the config in the users `~/.ipfs` directory.
Next, we are going to build our service.

```

list, err := corenet.Listen(nd, "/app/whyrusleeping")
if err != nil {
panic(err)
}
fmt.Printf("I am peer: %s\n", nd.Identity)
fmt.Printf("I am peer: %s\n", nd.Identity.Pretty())

for {
con, err := list.Accept()
Expand Down Expand Up @@ -92,7 +91,7 @@ import (
peer "github.com/ipfs/go-ipfs/p2p/peer"
fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo"

"code.google.com/p/go.net/context"
"golang.org/x/net/context"
)

func main() {
Expand All @@ -106,8 +105,8 @@ func main() {
}

// Basic ipfsnode setup
r := fsrepo.At("~/.ipfs")
if err := r.Open(); err != nil {
r, err := fsrepo.Open("~/.ipfs")
if err != nil {
panic(err)
}

Expand Down
4 changes: 2 additions & 2 deletions examples/ipns/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ are quite simple.
First, you'll need some content to publish:

```
$ echo "Let's have some mutable fun!" | ipfs add
$ echo 'Let\'s have some mutable fun!' | ipfs add
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but i like exclamation points!

```

note the hash that was output, and publish that hash out to the network:
Expand Down Expand Up @@ -37,7 +37,7 @@ http://gateway.ipfs.io/ipns/<your peer ID>
So, now comes the fun part: Lets change things.

```
$ echo "Look! Things have changed!" | ipfs add
$ echo 'Look! Things have changed!' | ipfs add
```

Next, take the hash from there and...
Expand Down
4 changes: 2 additions & 2 deletions examples/network/readme.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## Playing With the Network
Ipfs is all about networking! included are a useful set of commands
Ipfs is all about networking! Included are a useful set of commands
to aid in observing that network.

See who youre directly connected to:
See who you're directly connected to:
```
ipfs swarm peers
```
Expand Down