i don't understand why code has syntax error. package main import ( "fmt" "os/exec" "time" ) func ping(curl_out string) endtime int64 { try_curl := exec.command("curl", "localhost:8500/v1/catalog/nodes") try_curl_out := try_curl.output() try_curl_out == curl_out { try_curl := exec.command("curl", "localhost:8500/v1/catalog/nodes") try_curl_out := try_curl.output() } endtime := time.now().unix() return endtime } func main() { run_container := exec.command("docker", "run", "-p", "8400:8400", "-p", "8500:8500", "-p", "8600:53/udp", "-h", "node1", "progrium/consul", "-server", "-bootstrap") container_id, err := run_container.output() if err != nil { fmt.println(err) return } run_curl := exec.co...
Comments
Post a Comment