This change adds a --verbose=x flag (-v=x shorthand) to the Mu command, to set the glog logging level to x, for all subcommands.
26 lines
422 B
Go
26 lines
422 B
Go
// Copyright 2016 Marapongo, Inc. All rights reserved.
|
|
|
|
package main
|
|
|
|
import (
|
|
"flag"
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/golang/glog"
|
|
|
|
"github.com/marapongo/mu/cmd"
|
|
)
|
|
|
|
func main() {
|
|
// Ensure the glog library has been initialized, including calling flag.Parse beforehand.
|
|
flag.Parse()
|
|
glog.Info("Mu CLI is running")
|
|
defer glog.Flush()
|
|
|
|
if err := cmd.NewMuCmd().Execute(); err != nil {
|
|
fmt.Println(err)
|
|
os.Exit(-1)
|
|
}
|
|
}
|