Update cli to minio-io/cli

This commit is contained in:
Harshavardhana
2015-04-02 12:48:22 -07:00
parent 7a117bb6c5
commit 92136d49fd
5 changed files with 86 additions and 11 deletions

View File

@@ -3,12 +3,13 @@ package cli
import (
"fmt"
"io"
"io/ioutil"
"os"
"strings"
"time"
"io/ioutil"
"text/tabwriter"
"text/template"
"time"
)
// App is the main structure of a cli application. It is recomended that
@@ -44,6 +45,8 @@ type App struct {
CommandNotFound func(context *Context, command string)
// Compilation date
Compiled time.Time
// ExtraInfo pass additional info as a key value map
ExtraInfo map[string]string
// List of all authors who contributed
Authors []Author
// Name of Author (Note: Use App.Authors, this is deprecated)

View File

@@ -14,9 +14,12 @@ USAGE:
VERSION:
{{.Version}}
AUTHOR(S):
{{range .Authors}}{{ . }} {{end}}
BUILD:
{{.Compiled}}
{{range $key, $value := .ExtraInfo}}
{{ $key }}:
{{ $value }}
{{ end }}
COMMANDS:
{{range .Commands}}{{join .Names ", "}}{{ "\t" }}{{.Usage}}
{{end}}{{if .Flags}}