Skip to content

Commit

Permalink
tweak broker example
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Huus committed Aug 14, 2013
1 parent 934c568 commit cb8190c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions broker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,16 @@ func ExampleBroker() error {
if err != nil {
return err
}
defer broker.Close()

request := MetadataRequest{Topics: []string{"myTopic"}}
response, err := broker.GetMetadata("myClient", &request)
if err != nil {
return err
}

fmt.Println("There are", len(response.Topics), "topics active in the cluster.")

broker.Close()

return nil
}

Expand Down

0 comments on commit cb8190c

Please sign in to comment.