-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathmain.go
69 lines (61 loc) · 1.92 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package main
import (
"github.com/kha7iq/pingme/service/matrix"
"log"
"os"
"github.com/kha7iq/pingme/service/gotify"
"github.com/kha7iq/pingme/service/textmagic"
"github.com/kha7iq/pingme/service/mastodon"
"github.com/kha7iq/pingme/service/twillio"
"github.com/kha7iq/pingme/service/wechat"
"github.com/kha7iq/pingme/service/zulip"
"github.com/kha7iq/pingme/service/discord"
"github.com/kha7iq/pingme/service/email"
"github.com/kha7iq/pingme/service/line"
"github.com/kha7iq/pingme/service/mattermost"
"github.com/kha7iq/pingme/service/msteams"
"github.com/kha7iq/pingme/service/pushbullet"
"github.com/kha7iq/pingme/service/pushover"
"github.com/kha7iq/pingme/service/rocketchat"
"github.com/kha7iq/pingme/service/slack"
"github.com/kha7iq/pingme/service/telegram"
"github.com/urfave/cli/v2"
)
// Version variable is used for semVer
var Version string
// main with combine all the function into commands
func main() {
app := cli.NewApp()
app.Name = "PingMe"
app.Version = Version
app.Usage = "Send message to multiple platforms"
app.Description = `PingMe is a CLI tool which provides the ability to send messages or alerts to multiple
messaging platforms and also email, everything is configurable via environment
variables and command line switches.Currently supported platforms include Slack, Telegram,
RocketChat, Discord, Pushover, Mattermost, Pushbullet, Microsoft Teams, Twillio, Mastodon,
email address, Line, Gotify and Wechat.`
// app.Commands contains the subcommands as functions which return []*cli.Command.
app.Commands = []*cli.Command{
telegram.Send(),
rocketchat.Send(),
slack.Send(),
discord.Send(),
msteams.Send(),
pushover.Send(),
email.Send(),
mattermost.Send(),
pushbullet.Send(),
twillio.Send(),
zulip.Send(),
mastodon.Send(),
line.Send(),
wechat.Send(),
gotify.Send(),
textmagic.Send(),
matrix.Send(),
}
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}