Fix printing of port to console from placeholder and change some formatting of logging
This commit is contained in:
parent
817e36b168
commit
7eee357aad
1 changed files with 9 additions and 2 deletions
11
bot/utils.go
11
bot/utils.go
|
@ -27,13 +27,20 @@ func initGitHubClient() {
|
||||||
if privateKey != "" {
|
if privateKey != "" {
|
||||||
log.Println("Private key loaded from env!")
|
log.Println("Private key loaded from env!")
|
||||||
} else {
|
} else {
|
||||||
log.Println("Private key not found!")
|
log.Println("No private key specified in env!")
|
||||||
|
os.Exit(0)
|
||||||
|
}
|
||||||
|
|
||||||
|
if port != "" {
|
||||||
|
log.Println("Port configured from env!")
|
||||||
|
} else {
|
||||||
|
log.Println("No port specified in env!")
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func listenForWebhook() {
|
func listenForWebhook() {
|
||||||
log.Printf("Listening on :%d......\n", port)
|
log.Printf("Listening on :%s......\n", port)
|
||||||
|
|
||||||
http.HandleFunc("/", webHandle)
|
http.HandleFunc("/", webHandle)
|
||||||
http.HandleFunc("/webhook", webhookHandler)
|
http.HandleFunc("/webhook", webhookHandler)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue