gomie/main.go
Jens Christian True 0e809715e3
All checks were successful
continuous-integration/drone/push Build is passing
Added code documentation
2019-04-25 09:37:34 +02:00

37 lines
546 B
Go

package main
import (
"log"
"os"
"github.com/urfave/cli"
)
func main() {
app := cli.NewApp()
app.Name = "gomie"
app.Usage = "Simulating a Homie IOT device through Go"
app.Version = "0.0.1"
app.Flags = []cli.Flag{
cli.StringFlag{
Name: "mqtt, m",
Usage: "mqtt connection string",
Value: "tcp://localhost:1883",
},
}
app.Commands = []cli.Command{
{
Name: "run",
Usage: "Run a script and report to the Homie server",
Action: cmdRun,
},
}
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}