Skip to content

Commit

Permalink
Add steps to install Golang and how to run a Go program in the tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunyiLyu committed Jul 12, 2021
1 parent cdb5154 commit fe7535c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion docs/tutorial/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ here with read, write, and configure permissions all set to '.*'.

We now have everything we need to be able to publish and consume messages. The following Golang example
uses the created user 'test' to publish and consume messages from queue 'tutorial'. The example uses the [RabbitMQ
Golang client](https://github.com/rabbitmq/amqp091-go):
Golang client](https://github.com/rabbitmq/amqp091-go).

Before you can run the example below, you need to have Golang installed in your development environment. To install Golang, you can follow [this guide](https://golang.org/doc/install).

```golang

Expand Down Expand Up @@ -168,6 +170,13 @@ func main() {
}
```

The code snippet can be run by creating a file with an extension `.go` (for example `main.go`), then from command line,
you can run the just created program by referring its filename:

```bash
go run main.go
```

### Useful Links

Messaging Topology Operator [documentation](https://www.rabbitmq.com/kubernetes/operator/operator-overview.html#topology-operator), [API reference](https://github.com/rabbitmq/messaging-topology-operator/blob/main/docs/api/rabbitmq.com.ref.asciidoc), and [more examples](https://github.com/rabbitmq/messaging-topology-operator/tree/main/docs/examples).

0 comments on commit fe7535c

Please sign in to comment.