30 lines
622 B
Go
30 lines
622 B
Go
package cli
|
|
|
|
import (
|
|
"fmt"
|
|
"io"
|
|
)
|
|
|
|
func Usage(w io.Writer) {
|
|
fmt.Fprint(w, `slacksend - send a message to Slack (Incoming Webhook)
|
|
|
|
Usage:
|
|
slacksend [options] <message...>
|
|
echo "message" | slacksend [options]
|
|
|
|
Options:
|
|
--title <title> Message title (shown as bold)
|
|
--webhook <url> Slack Incoming Webhook URL
|
|
-V, --version show version
|
|
-h, --help show this help
|
|
|
|
Environment:
|
|
SLACK_WEBHOOK_URL Slack Incoming Webhook URL
|
|
|
|
Examples:
|
|
export SLACK_WEBHOOK_URL="https://hooks.slack.com/services/XXX/YYY/ZZZ"
|
|
slacksend "hello slack"
|
|
echo "hello from stdin" | slacksend
|
|
`)
|
|
}
|