Skip to content

Commit

Permalink
cmd: Move --group flag to analyze-mode only
Browse files Browse the repository at this point in the history
  • Loading branch information
iBug committed Sep 30, 2024
1 parent ef0784e commit 0e1216f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/analyze/analyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ type AnalyzerConfig struct {

func (c *AnalyzerConfig) InstallFlags(flags *pflag.FlagSet, cmdname string) {
flags.BoolVarP(&c.Absolute, "absolute", "a", c.Absolute, "Show absolute time for each item")
flags.BoolVarP(&c.Group, "group", "g", c.Group, "Try to group CIDRs")
flags.StringVarP(&c.LogOutput, "outlog", "o", c.LogOutput, "Change log output file")
flags.BoolVarP(&c.NoNetstat, "no-netstat", "", c.NoNetstat, "Do not detect active connections")
flags.StringVarP(&c.Parser, "parser", "p", c.Parser, "Log parser (see \"ayano list parsers\")")
Expand All @@ -148,6 +147,7 @@ func (c *AnalyzerConfig) InstallFlags(flags *pflag.FlagSet, cmdname string) {

if cmdname == "analyze" {
c.Whole = true
flags.BoolVarP(&c.Group, "group", "g", c.Group, "Try to group CIDRs")
flags.BoolVarP(new(bool), "whole", "w", false, "(This flag is implied in analyze mode)")
} else {
flags.BoolVarP(&c.Whole, "whole", "w", c.Whole, "Analyze whole log file and then tail it")
Expand Down

0 comments on commit 0e1216f

Please sign in to comment.