@echo off REM Default values set PORT=8080 REM Parse command-line arguments :parse_args if "%~1"=="" goto run_app if "%~1"=="-p" ( set PORT=%~2 shift shift goto parse_args ) else ( echo Unknown parameter passed: %~1 exit /b 1 ) :run_app REM Run the Go application with the parsed flags go run discord.go rss.go telegram.go save.go main.go -p=%PORT%