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

IF ELSE fixing

parent 6f24e2bf
......@@ -6,7 +6,6 @@ import (
"io/ioutil"
"log"
"net/http"
"os"
"os/exec"
"time"
......@@ -70,16 +69,17 @@ func checkApi() {
if err != nil {
Native()
fmt.Print(err.Error())
sendMail("API not response")
os.Exit(1)
time.Sleep(5 * time.Second)
//sendMail("API not response")
//os.Exit(1)
} else if response.StatusCode != 200 {
fmt.Println(response.StatusCode)
Native()
time.Sleep(5 * time.Second)
sendMail("API not response")
//sendMail("API not response")
}
fmt.Println(response.StatusCode)
}
func Shellout(command string) (error, string, string) {
......
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