Commit ccfcfd9a authored by Nico Baruna Putra's avatar Nico Baruna Putra

FIX :: remove timer sleep, add logs

parent 1938a10b
......@@ -66,15 +66,20 @@ func main() {
func checkApi() {
response, err := http.Get(BASE_URL + API_URL)
if err != nil {
fmt.Println("ERROR NIH BOS!, KONEKSI PUTUS , KEMUNGKINAN SERVICE MATI")
Native()
fmt.Print(err.Error())
//sendMail("API not response")
//os.Exit(1)
} else if response.StatusCode != 200 {
fmt.Println("ERROR NIH BOS!, API Tidak MERESPONS, STATUSNYA : ")
fmt.Println(response.StatusCode)
Native()
//sendMail("API not response")
} else {
fmt.Println("MASIH AMAN BOS!")
}
}
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment