Skip to content

๐ŸŽ‰ Simple CLI tool and Go library to post formatted status messages to a Slack channel / Go Slack Client

License

Notifications You must be signed in to change notification settings

pteich/slackstatus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

36 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

slackstatus GoDoc

Simple CLI tool and Go library to post formatted status messages to a Slack channel ๐ŸŽ‰

Slackstatus in Action

Usage as CLI tool

Slackstatus is available as pre-built binaries for macOS, Linux, FreeBSD and Windows on the release page.

slackstatus "message body" --webhook=https://hooks.slack.com/services/XXXX --color=good --chanel=status --user=slackstatus --footer="V1.0.0" --iconemoji=":monkey_face:"

You can also pipe your message text from another output:

echo "message text" | slackstatus --color=good

All flag values can also be pre-set in a config file .slackstatus.yml in the current directory or in your $HOME like so:

webhook: https://hooks.slack.com/services/XXXX
user: slackstatus
channel: status
footer: V1.0.0
iconemoji: :monkey_face:

It is also possible to provide a specific path to your config file as --config=/path/to/config.

Get help on all available flags:

slackstatus --help

Usage as Go library

package main

import "github.com/pteich/slackstatus"

var slackmsg = slackstatus.Message{
	WebhookURL: "https://hooks.slack.com/services/XXXX",
	Username: "slackstatus",
	Channel: "#status",
	IconEmoji: ":monkey_face:",
	Footer: "Version 1.0.0",
}

func main() {

	slackmsg.Send("Hello Slackstatus! Everything works fine.", slackstatus.ColorGood)
	slackmsg.Send("Oh crap, something went wrong!", slackstatus.ColorWarning)
	slackmsg.Send("Damn, we are in serious trouble!", slackstatus.ColorDanger)
	slackmsg.Send("Ok.", "#439FE0")
  
}

About

๐ŸŽ‰ Simple CLI tool and Go library to post formatted status messages to a Slack channel / Go Slack Client

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages