Skip to content

Commit df06620

Browse files
committed
bug fix: variable sandbox passed to the client.New method was not being set on the Client struct
1 parent 704a344 commit df06620

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

client/client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type Client struct {
2727
// Sandbox indicates whether the requests will be targeted to the sandbox AT endpoint
2828
func New(apiKey, username string, sandbox bool) *Client {
2929
cli := &http.Client{}
30-
return &Client{apiKey: apiKey, username: username, httpClient: cli}
30+
return &Client{apiKey: apiKey, username: username, sandbox: sandbox, httpClient: cli}
3131
}
3232

3333
// SetHTTPClient overrides the default http client

go.mod

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@ module github.com/kingzbauer/africastalking-go
22

33
go 1.13
44

5-
require github.com/go-playground/form v3.1.4+incompatible
5+
require (
6+
github.com/go-playground/form v3.1.4+incompatible
7+
gopkg.in/go-playground/assert.v1 v1.2.1 // indirect
8+
)

go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
github.com/go-playground/form v3.1.4+incompatible h1:lvKiHVxE2WvzDIoyMnWcjyiBxKt2+uFJyZcPYWsLnjI=
22
github.com/go-playground/form v3.1.4+incompatible/go.mod h1:lhcKXfTuhRtIZCIKUeJ0b5F207aeQCPbZU09ScKjwWg=
3+
gopkg.in/go-playground/assert.v1 v1.2.1 h1:xoYuJVE7KT85PYWrN730RguIQO0ePzVRfFMXadIrXTM=
4+
gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE=

0 commit comments

Comments
 (0)