本文整理汇总了Golang中launchpad/net/gnuflag.FlagSet.UintVar方法的典型用法代码示例。如果您正苦于以下问题:Golang FlagSet.UintVar方法的具体用法?Golang FlagSet.UintVar怎么用?Golang FlagSet.UintVar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类launchpad/net/gnuflag.FlagSet
的用法示例。
在下文中一共展示了FlagSet.UintVar方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: SetFlags
func (c *DebugLogCommand) SetFlags(f *gnuflag.FlagSet) {
f.Var(cmd.NewAppendStringsValue(&c.params.IncludeEntity), "i", "only show log messages for these entities")
f.Var(cmd.NewAppendStringsValue(&c.params.IncludeEntity), "include", "only show log messages for these entities")
f.Var(cmd.NewAppendStringsValue(&c.params.ExcludeEntity), "x", "do not show log messages for these entities")
f.Var(cmd.NewAppendStringsValue(&c.params.ExcludeEntity), "exclude", "do not show log messages for these entities")
f.Var(cmd.NewAppendStringsValue(&c.params.IncludeModule), "include-module", "only show log messages for these logging modules")
f.Var(cmd.NewAppendStringsValue(&c.params.ExcludeModule), "exclude-module", "do not show log messages for these logging modules")
f.StringVar(&c.level, "l", "", "log level to show, one of [TRACE, DEBUG, INFO, WARNING, ERROR]")
f.StringVar(&c.level, "level", "", "")
f.UintVar(&c.params.Backlog, "n", defaultLineCount, "go back this many lines from the end before starting to filter")
f.UintVar(&c.params.Backlog, "lines", defaultLineCount, "")
f.UintVar(&c.params.Limit, "limit", 0, "show at most this many lines")
f.BoolVar(&c.params.Replay, "replay", false, "start filtering from the start")
}
示例2: SetFlags
func (c *debugLogCommand) SetFlags(f *gnuflag.FlagSet) {
f.Var(cmd.NewAppendStringsValue(&c.params.IncludeEntity), "i", "Only show log messages for these entities")
f.Var(cmd.NewAppendStringsValue(&c.params.IncludeEntity), "include", "Only show log messages for these entities")
f.Var(cmd.NewAppendStringsValue(&c.params.ExcludeEntity), "x", "Do not show log messages for these entities")
f.Var(cmd.NewAppendStringsValue(&c.params.ExcludeEntity), "exclude", "Do not show log messages for these entities")
f.Var(cmd.NewAppendStringsValue(&c.params.IncludeModule), "include-module", "Only show log messages for these logging modules")
f.Var(cmd.NewAppendStringsValue(&c.params.ExcludeModule), "exclude-module", "Do not show log messages for these logging modules")
f.StringVar(&c.level, "l", "", "Log level to show, one of [TRACE, DEBUG, INFO, WARNING, ERROR]")
f.StringVar(&c.level, "level", "", "")
f.UintVar(&c.params.Backlog, "n", defaultLineCount, "Show this many of the most recent (possibly filtered) lines, and continue to append")
f.UintVar(&c.params.Backlog, "lines", defaultLineCount, "")
f.UintVar(&c.params.Limit, "limit", 0, "Exit once this many of the most recent (possibly filtered) lines are shown")
f.BoolVar(&c.params.Replay, "replay", false, "Show the entire (possibly filtered) log and continue to append")
f.BoolVar(&c.params.NoTail, "T", false, "Stop after returning existing log messages")
f.BoolVar(&c.params.NoTail, "no-tail", false, "")
}