slack_notify

command
v0.0.0-...-b425644 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

README

Slack Notifier

This small helper will execute a given command and send a configured message to slack that has

  • status success on return value 0 of the command, and
  • status error on any other return value.

For example

slack_notify "testing slack_notify" do_something

would call the do_something command (that of course must be available in the callers path) and send a message with the text "testing slack_notify" to the slack organization and channel configured in the ${HOME}/.slack.conf file.

The configuration file is in JSON format and has the following form:

{
	"webhook_url": "https://hooks.slack.com/services/...",
	"channel": "#slack_notify_channel",
	"username": "Mr. Slack Notify",
	"emoji": ":ghost:"
}

If channel, username or emoji are not specified the values of the given webhook URL are used (see your slack integration configuration for that respective webhook).

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL