Update readme

This commit is contained in:
Martin Polden 2016-10-09 16:21:07 +02:00
parent b1b3fbb5f3
commit 4a9710dcea
2 changed files with 11 additions and 10 deletions

View File

@ -83,14 +83,15 @@ Usage:
ipd [OPTIONS]
Application Options:
-f, --country-db=FILE Path to GeoIP country database
-c, --city-db=FILE Path to GeoIP city database
-l, --listen=ADDR Listening address (default: :8080)
-r, --reverse-lookup Perform reverse hostname lookups
-p, --port-lookup Enable port lookup
-t, --template= Path to template (default: index.html)
-H, --trusted-header= Header to trust for remote IP, if present (e.g. X-Real-IP)
-f, --country-db=FILE Path to GeoIP country database
-c, --city-db=FILE Path to GeoIP city database
-l, --listen=ADDR Listening address (default: :8080)
-r, --reverse-lookup Perform reverse hostname lookups
-p, --port-lookup Enable port lookup
-t, --template=FILE Path to template (default: index.html)
-H, --trusted-header=NAME Header to trust for remote IP, if present (e.g. X-Real-IP)
-L, --log-level=[debug|info|warn|error|fatal|panic] Log level to use (default: info)
Help Options:
-h, --help Show this help message
-h, --help Show this help message
```

View File

@ -19,8 +19,8 @@ func main() {
Listen string `short:"l" long:"listen" description:"Listening address" value-name:"ADDR" default:":8080"`
ReverseLookup bool `short:"r" long:"reverse-lookup" description:"Perform reverse hostname lookups"`
PortLookup bool `short:"p" long:"port-lookup" description:"Enable port lookup"`
Template string `short:"t" long:"template" description:"Path to template" default:"index.html"`
IPHeader string `short:"H" long:"trusted-header" description:"Header to trust for remote IP, if present (e.g. X-Real-IP)"`
Template string `short:"t" long:"template" description:"Path to template" default:"index.html" value-name:"FILE"`
IPHeader string `short:"H" long:"trusted-header" description:"Header to trust for remote IP, if present (e.g. X-Real-IP)" value-name:"NAME"`
LogLevel string `short:"L" long:"log-level" description:"Log level to use" default:"info" choice:"debug" choice:"info" choice:"warn" choice:"error" choice:"fatal" choice:"panic"`
}
_, err := flags.ParseArgs(&opts, os.Args)