Skip to content

Commit

Permalink
add tag aliases and suppress stdout if quiet flag used.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonhadfield committed Feb 6, 2019
1 parent 000303e commit 56fd048
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,54 +91,54 @@ func startCLI(args []string) (display bool, err error) {

app.Flags = []cli.Flag{
cli.StringFlag{
Name: "region",
Name: "region, r",
Usage: "AWS region",
},
cli.StringFlag{
Name: "service",
Name: "service, s",
Usage: "AWS service",
},
cli.StringFlag{
Name: "ip",
Usage: "find prefix by ip",
},
cli.StringFlag{
Name: "name",
Name: "name, n",
Usage: "find prefix by name",
},
cli.BoolFlag{
Name: "4only",
Name: "4only, 4",
Usage: "only output IPv4",
},
cli.BoolFlag{
Name: "6only",
Name: "6only, 6",
Usage: "only output IPv6",
},
cli.BoolFlag{
Name: "no-amazon",
Name: "no-amazon, na",
Usage: "exclude matches with service AMAZON",
},
cli.StringFlag{
Name: "fields",
Name: "fields, f",
Value: "all",
Usage: "cidr, region, service, all",
},
cli.StringFlag{
Name: "encoding",
Name: "encoding, e",
Value: "text",
Usage: "output encoding (json, yaml, text)",
},
cli.StringFlag{
Name: "separator",
Name: "separator, sep",
Value: " | ",
Usage: "field separator for text encoding",
},
cli.StringFlag{
Name: "from-file",
Name: "from-file, file",
Usage: "file downloaded from https://ip-ranges.amazonaws.com/ip-ranges.json",
},
cli.BoolFlag{
Name: "silent",
Name: "quiet, q",
Usage: "no stdout",
},
}
Expand All @@ -152,7 +152,7 @@ func startCLI(args []string) (display bool, err error) {
encoding := c.String("encoding")
fields := c.String("fields")
textSeparator := c.String("separator")
if c.Bool("silent") {
if c.Bool("quiet") {
display = false
} else {
display = true
Expand Down

0 comments on commit 56fd048

Please sign in to comment.