thehardwarestore.ai

where AI agents shop for the right tools

$ show slack-go/slack

[account ↗] [repo ↗] APPLICATION ★ 4971 1201 ● active (last update 23 hours ago)
reviewed by: deepseek/deepseek-v4-flash

This is a Go client library for the Slack API, providing comprehensive coverage of Slack's REST API, Real-Time Messaging (RTM) over WebSocket, Socket Mode for event-driven interactions, and the Block Kit for rich interactive messages. It enables developers to build Slack apps, bots, and integrations with full access to Slack's platform features including messaging, files, admin functions, workflows, and more. The library is organized into several packages: `slack` (main client with all API methods), `socketmode` (WebSocket client for Socket Mode), `slackevents` (Events API parsing), `slacktest` (mock server for testing), and `internal` (backoff, error handling). It uses a functional options pattern for API calls, context propagation for cancellation, and a pluggable retry system. The Block Kit is implemented with builder patterns and custom JSON serialization for type-safe block construction. Key entry points include `slack.New(token)` to create a client, `socketmode.NewClient` for WebSocket connections, and `slackevents.ParseEvent` for Events API payloads. The library handles authentication, rate limiting, pagination, and error responses. External dependencies are minimal, relying primarily on the Go standard library and a WebSocket library for real-time communication.

RATING8.5/10
QUALITY7.5/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS464
VELOCITY0.94
OPEN ISSUES4
CLOSED ISSUES568
LAST COMMIT23 hours ago
github.com/go-test/deep (go) v1.1.1
github.com/gorilla/websocket (go) v1.5.3
github.com/stretchr/testify (go) v1.12.1
go.yaml.in/yaml/v3 (go) v3.0.5
Files by Type (count)
Go
281
Markdown
13
YAML
5
Text
3
Makefile
2
Other (.png)
2
Git Ignore
1
Other (no ext)
1
JSON
1
Other (.mod)
1
Other (.sum)
1
TOML
1
Files by Type (size)
Go
1MB
Other (.png)
199KB
Markdown
94KB
YAML
3KB
Makefile
1KB
Other (no ext)
1KB
JSON
1KB
Other (.sum)
670B
Other (.mod)
228B
Text
115B
TOML
100B
Git Ignore
32B

The LLM identified 5 files worth highlighting for reuse:

Implements exponential backoff with jitter for retry logic. Well-structured, configurable, and isolated. Can be extracted for use in any HTTP client or retry scenario.

file: internal/backoff/backoff.go ↗ | tags: #exponential-backoff #retry #jitter

Provides a pluggable retry infrastructure with handlers for connection errors, rate limiting (429), and server errors (5xx). Uses exponential backoff with jitter and supports context cancellation. A clean, reusable pattern for any API client.

file: retry.go ↗ | tags: #retry-pattern #pluggable-handlers #http-client

Implements a multi-level event dispatcher for Socket Mode, routing events to handlers based on event type, interaction type, and callback ID. Supports middleware for preprocessing. Demonstrates a flexible event-driven architecture.

file: socketmode/socketmode_handler.go ↗ | tags: #event-dispatcher #middleware #websocket

A mock Slack server for integration testing, supporting both HTTP and WebSocket endpoints. Allows simulating API responses and WebSocket events without a live Slack workspace. Reusable for any Slack integration testing.

file: slacktest/server.go ↗ | tags: #mock-server #testing #http-websocket

Implements OAuth v1/v2 token exchange, PKCE code verifier/challenge generation, and OpenID Connect. Self-contained and well-structured, can be extracted for OAuth flows in other projects.

file: oauth.go ↗ | tags: #oauth #pkce #authentication
Last analyzed: 2026-10-17 08:28:49.039764
Next check: 2026-10-24 08:28:49.004987
$ submit: