5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-10 15:40:30 +00:00
matterbridge/vendor/github.com/nlopes/slack/examples/groups/groups.go
2016-09-05 16:34:37 +02:00

23 lines
423 B
Go

package main
import (
"fmt"
"github.com/nlopes/slack"
)
func main() {
api := slack.New("YOUR_TOKEN_HERE")
// If you set debugging, it will log all requests to the console
// Useful when encountering issues
// api.SetDebug(true)
groups, err := api.GetGroups(false)
if err != nil {
fmt.Printf("%s\n", err)
return
}
for _, group := range groups {
fmt.Printf("ID: %s, Name: %s\n", group.ID, group.Name)
}
}