package main

import (
	"gopkg.in/urfave/cli.v1"
	"os"
)

const version = "0.2.0"

func main() {
	app := cli.NewApp()
	app.Name = "ustat"
	app.Version = version
	app.Usage = "Unified system statistics collector"
	app.Authors = []cli.Author{
		cli.Author{
			Name:  "Pekka Enberg",
			Email: "penberg@iki.fi",
		},
	}
	app.HideHelp = true
	app.Commands = []cli.Command{
		recordCommand,
		reportCommand,
	}
	app.Run(os.Args)
}

package main

import (
	"fmt"
	"gopkg.in/urfave/cli.v1"
	"os"
)

const version = "0.2.0"

func main() {
	app := cli.NewApp()
	app.Name = "ustat"
	app.Version = version
	app.Usage = "Unified system statistics collector"
	app.Authors = []cli.Author{
		cli.Author{
			Name:  "Pekka Enberg",
			Email: "penberg@iki.fi",
		},
	}
	app.HideHelp = true
	app.Commands = []cli.Command{
		recordCommand,
		reportCommand,
	}
	if err := app.Run(os.Args); err != nil {
		fmt.Fprintf(os.Stderr, "error: %v\n", err)
		os.Exit(1)
	}
}

Exit proces with error message and error code
cmd/ustat: Exit proces with error message and error code

If the command returns an error, exit the process with an error message
and error code.
