Introducing Contexts

Contexts have been added to all API requests, in addition to other linting fixes
This commit is contained in:
densestvoid
2021-01-22 16:47:22 -05:00
parent 646bec0e27
commit f92a8a7a86
33 changed files with 374 additions and 542 deletions

View File

@ -1,6 +1,7 @@
package main
import (
"context"
"fmt"
"github.com/densestvoid/groupme"
@ -16,5 +17,5 @@ const botID = "0123456789ABCDEF"
func main() {
// Create a new client with your auth token
client := groupme.NewClient("")
fmt.Println(client.PostBotMessage(botID, "Your message here!", nil))
fmt.Println(client.PostBotMessage(context.Background(), botID, "Your message here!", nil))
}