Make usage cayley intro banner contextual

Only provide it when people run cayley without any other args.
This commit is contained in:
kortschak 2014-08-22 16:40:22 +09:30
parent 318edfc3c7
commit d9096d6d9f

View file

@ -64,8 +64,7 @@ var (
)
func usage() {
fmt.Fprintln(os.Stderr, `Cayley is a graph store and graph query layer.
fmt.Fprintln(os.Stderr, `
Usage:
cayley COMMAND [flags]
@ -87,6 +86,7 @@ func init() {
func main() {
// No command? It's time for usage.
if len(os.Args) == 1 {
fmt.Fprintln(os.Stderr, "Cayley is a graph store and graph query layer.")
usage()
os.Exit(1)
}