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

IF ELSE fixing

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