Move --addr flag under webserver subcommand

This commit is contained in:
Alessio 2024-03-10 18:59:58 -07:00
parent 07233a7153
commit f3b71a2633
2 changed files with 3 additions and 2 deletions

View File

@ -33,7 +33,7 @@ pipeline:
commands:
- cd cmd
- ./compile.sh
- ./tw --profile ../sample_data/profile --addr localhost:1000 webserver &
- ./tw --profile ../sample_data/profile webserver --addr localhost:1000 &
- sleep 1
- curl localhost:1000/cernovich > webserver_test_output.html
- jobs -p | xargs -I{} kill -- -{}

View File

@ -33,7 +33,6 @@ func main() {
flag.BoolVar(show_version_flag, "v", false, "")
session_name := flag.String("session", "", "Name of session file to use")
addr := flag.String("addr", "localhost:1973", "port to listen on") // Random port that's probably not in use
how_many := flag.Int("n", 50, "")
flag.IntVar(how_many, "number", 50, "")
@ -189,6 +188,8 @@ func main() {
case "webserver":
fs := flag.NewFlagSet("", flag.ExitOnError)
should_auto_open := fs.Bool("auto-open", false, "")
addr := fs.String("addr", "localhost:1973", "port to listen on") // Random port that's probably not in use
if err := fs.Parse(args[1:]); err != nil {
panic(err)
}