1
0
mirror of https://github.com/kha7iq/pingme.git synced 2025-05-15 14:20:18 -07:00
pingme/main.go
2021-04-15 16:06:26 +08:00

39 lines
944 B
Go

package main
import (
"log"
"os"
"github.com/kha7iq/pingme/cmd"
"github.com/urfave/cli/v2"
)
// Version variable is used for semVer
var Version string
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, Microsoft Teams and email address.`
// app.Commands contains the subcommands as functions which return []*cli.Command.
app.Commands = []*cli.Command{
cmd.SendToTelegram(),
cmd.SendToRocketChat(),
cmd.SendToSlack(),
cmd.SendToDiscord(),
cmd.SendToTeams(),
cmd.SendToEmail(),
}
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}