Files
remark42/backend/vendor/github.com/slack-go/slack
Dmitry VerkhoturovandUmputun 80c12a3f10 chore(deps): update Go modules
Bump Go dependencies in both backend/ and backend/_example/memory_store.

Notable updates:
- github.com/go-pkgz/lgr v0.12.1 -> v0.12.3
- github.com/klauspost/compress v1.18.2 -> v1.18.5
- github.com/PuerkitoBio/goquery v1.11.0 -> v1.12.0
- github.com/montanaflynn/stats v0.7.1 -> v0.9.0
- github.com/redis/go-redis/v9 v9.17.2 -> v9.18.0
- github.com/slack-go/slack v0.17.3 -> v0.21.1
- go.mongodb.org/mongo-driver v1.17.6 -> v1.17.9
- golang.org/x/crypto v0.48.0 -> v0.50.0
- golang.org/x/net v0.49.0 -> v0.53.0
- golang.org/x/image v0.36.0 -> v0.39.0
- golang.org/x/sys v0.41.0 -> v0.43.0
- golang.org/x/{oauth2,sync,text} minor bumps

Key markdown/sanitisation libs (bluemonday v1.0.27,
alecthomas/chroma/v2 v2.23.1, russross/blackfriday/v2 v2.1.0,
Depado/bfchroma/v2 v2.0.0) are already at the latest available
versions and were not bumped.

Verified the Chroma span-class allowlist regex in
backend/app/store/comment.go:128-131 is still fully in sync with
chroma/v2 types.go StandardTypes map (86 classes, byte-equal after
sorting). The inline comment references commit c263f6f which is
stale (Chroma is at v2 now), but the class list content is current.

Ran `go mod tidy` + `go mod vendor` + full race test suite on both
modules. All green. Added a reminder in CLAUDE.md that updating
backend/ Go modules also requires `go mod tidy` in
backend/_example/memory_store since the example module uses a
local replace directive and inherits indirect deps from the main
module.
2026-04-12 11:52:57 -05:00
..
2025-12-03 19:47:01 -06:00
2025-12-03 19:47:01 -06:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2025-12-03 19:47:01 -06:00
2025-12-03 19:47:01 -06:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2025-12-03 19:47:01 -06:00
2026-04-12 11:52:57 -05:00
2025-12-03 19:47:01 -06:00
2025-12-03 19:47:01 -06:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2025-12-03 19:47:01 -06:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2021-04-21 12:56:14 -05:00
2025-12-03 19:47:01 -06:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2021-04-21 12:56:14 -05:00
2026-04-12 11:52:57 -05:00
2021-09-08 11:34:48 -05:00
2021-04-21 12:56:14 -05:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2025-12-03 19:47:01 -06:00
2021-04-21 12:56:14 -05:00
2021-04-21 12:56:14 -05:00
2021-04-21 12:56:14 -05:00
2021-04-21 12:56:14 -05:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2025-12-03 19:47:01 -06:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2021-04-21 12:56:14 -05:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2025-12-03 19:47:01 -06:00
2025-12-03 19:47:01 -06:00
2021-04-21 12:56:14 -05:00
2026-04-12 11:52:57 -05:00
2024-07-30 20:23:33 -05:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2026-04-12 11:52:57 -05:00
2021-04-21 12:56:14 -05:00

Slack API in Go Go Reference CI

You can chat with us on the #slack-go, #slack-go-ja Slack channel on the Gophers Slack.

logo

This library supports most if not all of the api.slack.com REST calls, as well as the Real-Time Messaging protocol over websocket, in a fully managed way.

Project Status

There is currently no major version released. Therefore, minor version releases may include backward incompatible changes.

See Releases for more information about the changes.

Go Versions supported

We support the same versions of Go as the officially supported Go versions (see Go Release Policy).

Installing

go get

$ go get -u github.com/slack-go/slack

Example

Getting all groups

import (
    "fmt"

    "github.com/slack-go/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
    // slack.New("YOUR_TOKEN_HERE", slack.OptionDebug(true))
    groups, err := api.GetUserGroups(slack.GetUserGroupsOptionIncludeUsers(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)
    }
}

Getting User Information

import (
    "fmt"

    "github.com/slack-go/slack"
)

func main() {
    api := slack.New("YOUR_TOKEN_HERE")
    user, err := api.GetUserInfo("U023BECGF")
    if err != nil {
        fmt.Printf("%s\n", err)
        return
    }
    fmt.Printf("ID: %s, Fullname: %s, Email: %s\n", user.ID, user.Profile.RealName, user.Profile.Email)
}

HTTP retries

Retries are off by default. Use OptionRetry(n) for 429-only retries, or OptionRetryConfig(cfg) for full control (connection, 429, opt-in 5xx). With a custom client, pass retry options after OptionHTTPClient. See package slack doc for handler details.

api := slack.New("YOUR_TOKEN_HERE", slack.OptionRetry(3))

Minimal Socket Mode usage:

See https://github.com/slack-go/slack/blob/master/examples/socketmode/socketmode.go

Minimal RTM usage:

As mentioned in https://api.slack.com/rtm - for most applications, Socket Mode is a better way to communicate with Slack.

See https://github.com/slack-go/slack/blob/master/examples/websocket/websocket.go

Minimal EventsAPI usage:

See https://github.com/slack-go/slack/blob/master/examples/eventsapi/events.go

Socketmode Event Handler (Experimental)

When using socket mode, dealing with an event can be pretty lengthy as it requires you to route the event to the right place.

Instead, you can use SocketmodeHandler much like you use an HTTP handler to register which event you would like to listen to and what callback function will process that event when it occurs.

See ./examples/socketmode_handler/socketmode_handler.go

Contributing

You are more than welcome to contribute to this project. Fork and make a Pull Request, or create an Issue if you see any problem.

Before making any Pull Request please run the following:

make pr-prep

This will check/update code formatting, linting and then run all tests

License

BSD 2 Clause license