Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var App = grumble.New(&grumble.Config{ Name: "blobstore manager", Description: "A command manager of blobstore", HistoryFile: path.Join(os.TempDir(), ".blobstore_cli.history"), HistoryLimit: 10000, ErrorColor: color.New(color.FgRed, color.Bold, color.Faint), HelpHeadlineColor: color.New(color.FgGreen), HelpHeadlineUnderline: false, HelpSubCommands: true, Prompt: "BS $> ", PromptColor: color.New(color.FgBlue, color.Bold), PromptRuntime: func() func() string { username := "NO-USER" hostname := "NO-HOSTNAME" if user, err := user.Current(); err == nil { username = user.Username } if host, _ := os.Hostname(); host != "" { hostname = host } return func() string { now := time.Now() mins := (now.Hour() * 60) + now.Minute() curr := mins * 100 / (60 * 24) tStr := now.Format("01-02 15:04:05.000") return color.New().Sprintf("%s %s%s %s@%s %s ", color.New(color.FgBlue, color.Italic).Sprint("BS"), color.New(color.FgMagenta, color.Faint).Sprintf("[%s]", common.BoldBar(curr)), color.New(color.FgMagenta, color.Faint).Sprintf("[%s]", tStr), color.New(color.FgGreen, color.Bold).Sprint(username), color.New(color.FgYellow, color.Bold).Sprint(hostname), color.New(color.FgBlack, color.BgHiYellow).Sprint(" $> "), ) } }(), Flags: func(f *grumble.Flags) { flags.ConfigRegister(f) flags.VerboseRegister(f) flags.VverboseRegister(f) f.BoolL("silence", false, "disable print output") }, })
App blobstore command app
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.