Skip to content

Commit

Permalink
style: go back to old constructor names
Browse files Browse the repository at this point in the history
  • Loading branch information
amatsagu committed Dec 10, 2023
1 parent 51e596e commit 839a245
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func (client *Client) Close(ctx context.Context) error {
return nil
}

func NewDefaultClient(options ClientOptions) *Client {
func NewClient(options ClientOptions) *Client {
discordPublicKey, err := hex.DecodeString(options.PublicKey)
if err != nil {
panic("failed to decode discord's public key (check if it's correct key): " + err.Error())
Expand Down
2 changes: 1 addition & 1 deletion rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func (rest *iRest) handleRequest(method string, route string, jsonPayload interf
return body, nil, true
}

func NewDefaultRest(token string) Rest {
func NewRest(token string) Rest {
return &iRest{
token: "Bot " + token,
httpClient: &http.Client{Timeout: time.Second * 3},
Expand Down
2 changes: 1 addition & 1 deletion rest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func TestRest(t *testing.T) {
t.Skip("can't test rest due to no provided token")
}

rest := NewDefaultRest(token)
rest := NewRest(token)
go requestGateway(rest, t)
go requestGateway(rest, t)
go requestGateway(rest, t)
Expand Down

0 comments on commit 839a245

Please sign in to comment.