-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
45 lines (38 loc) · 855 Bytes
/
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
// Package main contains a CLI to help sizing a Newts cluster
//
// @author Alejandro Galue <agalue@opennms.com>
package main
import (
"fmt"
"os"
"github.com/agalue/newts-sizing/cli/analysis"
"github.com/agalue/newts-sizing/cli/sizing"
"github.com/urfave/cli"
)
var (
version = "v1.0.5"
)
func main() {
var app = cli.NewApp()
initCliInfo(app)
initCliCommands(app)
err := app.Run(os.Args)
if err != nil {
fmt.Fprintf(os.Stderr, "ERROR: %s\n", err)
os.Exit(1)
}
}
func initCliInfo(app *cli.App) {
app.Name = "newts-sizing"
app.Usage = "A CLI to help sizing a Cassandra/ScyllaDB cluster for Newts"
app.Author = "Alejandro Galue"
app.Email = "agalue@opennms.com"
app.Version = version
app.EnableBashCompletion = true
}
func initCliCommands(app *cli.App) {
app.Commands = []cli.Command{
analysis.Command,
sizing.Command,
}
}