A lightweight Slack message utility for use in Netlify serverless functions.
go get github.com/codevideo/[email protected]package main
import (
utils "github.com/codevideo/go-utils/slack"
)
func main() {
err := utils.SendSlackMessage(slackMessageContent)
if err != nil {
log.Printf("Error sending Slack message: %v", err)
}
}Set SLACK_WEBHOOK_URL to your Slack incoming webhook URL.
Migration note (v0.0.3): The env var was renamed from
CODEVIDEO_SLACK_WEBHOOK_URLtoSLACK_WEBHOOK_URL. The old name is still supported as a fallback but will be removed in a future version.