Skip to content

Commit

Permalink
update command line flags
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoney committed Jun 13, 2024
1 parent ae4eff1 commit cf8d970
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ The calculation for how big a file would take is effectively the largest IP - th
$ cidr-encoder -h
Usage of cidr-encoder:
-calc
Calculate the size of the encoded file
Calculate the size of the encoded file. Reads from STDIN.
-encode
Encode the CIDRs
Encode the CIDRs. Reads from STDIN.
-name string
The file base name to use as the ACL file name(e.g test.acl name is test)
The file base name to use as the ACL file name(e.g test.acl name is test).
-search string
Search for a IP in the CIDRs
Search for a IP in the CIDRs.
```
`-calc`, `encode`, and `search` are all mutually exclusive but the priority in the event that all are specified are `calc` then `encode` then `search`.
8 changes: 4 additions & 4 deletions cmd/cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import (
)

var (
name = flag.String("name", "", "The file base name to use as the ACL file name(e.g test.acl name is test)")
encode = flag.Bool("encode", false, "Encode the CIDRs")
search = flag.String("search", "", "Search for a IP in the CIDRs")
calc = flag.Bool("calc", false, "Calculate the size of the encoded file")
name = flag.String("name", "", "The file base name to use as the ACL file name(e.g test.acl name is test).")
encode = flag.Bool("encode", false, "Encode the CIDRs. Reads from STDIN.")
search = flag.String("search", "", "Search for a IP in the CIDRs.")
calc = flag.Bool("calc", false, "Calculate the size of the encoded file. Reads from STDIN.")
)

func main() {
Expand Down

0 comments on commit cf8d970

Please sign in to comment.