Skip to content

Commit 6cd2bf5

Browse files
committed
There is no need to specify the 'messagebird' identifier when importing this package; Fix an error in the example code in the README
1 parent c2fa24b commit 6cd2bf5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Examples
2525
Here is a quick example on how to get started. Assuming the **go get** installation worked, you can import the messagebird package like this:
2626

2727
```go
28-
import messagebird "github.com/messagebird/go-rest-api"
28+
import "github.com/messagebird/go-rest-api"
2929
```
3030

3131
Then, create an instance of **messagebird.Client**:
@@ -42,7 +42,7 @@ balance, err := client.Balance()
4242
if err != nil {
4343
// messagebird.ErrResponse means custom JSON errors.
4444
if err == messagebird.ErrResponse {
45-
for _, mbError := range object.Errors {
45+
for _, mbError := range balance.Errors {
4646
fmt.Printf("Error: %#v\n", mbError)
4747
}
4848
}

0 commit comments

Comments
 (0)