package main import "time" func main() { // infinite loop for { for i := 0; i < 2; i++ { conn, err := opentsdb.OpenConnection() if err { time.Sleep(10 * time.Second) } } } } I need Program will execute from the beginning if an error block occur.
How to handle it?