The sleepy for loop in Go
Contrived example: Let’s say you have a JSON file with an array of IP address strings, and you want to reload this file every 3 seconds, and then doSomething with every IP that’s new. And in case the file doesn’t exist, or contains invalid JSON, you want to retry in 3 seconds as…