Change command line args from _ to -
This commit is contained in:
parent
e625bcfcf5
commit
b4ef77a93d
8
main.go
8
main.go
|
@ -13,13 +13,13 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
satel_api_addr := flag.String("satel_addr", "", "Address that should be used to connect to the SATEL device")
|
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")
|
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.")
|
chat_id_raw := flag.String("tg-chat-id", "", "Telegram Chat ID where to send updates. Use \",\" to specify multiple IDs.")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
if len(*satel_api_addr) == 0 || len(*satel_api_port) == 0 || len(*chat_id_raw) == 0 {
|
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)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
chat_ids_strings := strings.Split(*chat_id_raw, ",")
|
chat_ids_strings := strings.Split(*chat_id_raw, ",")
|
||||||
|
|
Loading…
Reference in New Issue