1
0
Fork 0

Change command line args from _ to -

This commit is contained in:
Michał Rudowicz 2024-02-08 22:09:31 +01:00
parent e625bcfcf5
commit b4ef77a93d
1 changed files with 4 additions and 4 deletions

View File

@ -13,13 +13,13 @@ import (
)
func main() {
satel_api_addr := flag.String("satel_addr", "", "Address that should be used to connect to the SATEL device")
satel_api_port := flag.String("satel_port", "7094", "Port that should be used to connect to the SATEL device")
chat_id_raw := flag.String("tg_chat_id", "", "Telegram Chat ID where to send updates. Use \",\" to specify multiple IDs.")
satel_api_addr := flag.String("satel-addr", "", "Address that should be used to connect to the SATEL device")
satel_api_port := flag.String("satel-port", "7094", "Port that should be used to connect to the SATEL device")
chat_id_raw := flag.String("tg-chat-id", "", "Telegram Chat ID where to send updates. Use \",\" to specify multiple IDs.")
flag.Parse()
if len(*satel_api_addr) == 0 || len(*satel_api_port) == 0 || len(*chat_id_raw) == 0 {
fmt.Println("Use --satel_addr=ADDR, --satel_port=PORT and --tg_chat_id=CHAT_ID command line flags to continue.")
fmt.Println("Use --satel-addr=ADDR, --satel-port=PORT and --tg-chat-id=CHAT_ID command line flags to continue.")
os.Exit(1)
}
chat_ids_strings := strings.Split(*chat_id_raw, ",")