netwatch-server refuses arguments it does not understand (closes #179)
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
cli.Main starts the server only when given no arguments. check-cidr CIDR and prepare-data-dir DATA_DIR run as before. Any other command line, such as a subcommand with no value or two values, or a misspelt subcommand, gets a one-line usage message naming both forms on stderr and exit code 2. It used to start the server, which then held the port. Model: opus-5-5
This commit was merged in pull request #187.
This commit is contained in:
@@ -220,7 +220,8 @@ packages are in `internal/`:
|
||||
|
||||
- **`cli`**: Runs `netwatch-server` from its command line: the `check-cidr` and
|
||||
`prepare-data-dir` subcommands, which `bin/entrypoint.sh` runs before it
|
||||
starts the server, and otherwise the server, with the `fx` wiring.
|
||||
starts the server, and, given no arguments, the server, with the `fx` wiring.
|
||||
It refuses any other arguments with a usage message and exit code 2.
|
||||
- **`config`**: Loads configuration from environment variables and config files
|
||||
via Viper.
|
||||
- **`handlers`**: HTTP request handlers for the API (health check, report
|
||||
|
||||
Reference in New Issue
Block a user