This package provides an interface to RocketChat's Webhook / notification REST API (provided an endpoint is made available) and a command line tool for simple message sending / delivery.
go get -u github.com/fako1024/rc-notify
req := rc.Request{
Channel: "@me",
User: "Sending User",
Message: "My message",
Emoji: rc.EmojiAlert,
}
// Execute the request (set webhook URI accordingly)
uri := "https://your.rc.instance.com/hooks/.../..."
if err := rc.Send(uri, req); err != nil {
log.Fatalf("Failed to send message: %s", err)
}