paint-brush
The sleepy for loop in Goby@felixge
878 reads
878 reads

The sleepy for loop in Go

by Felix Geisendörfer2mOctober 30th, 2015
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

<strong>Contrived example:</strong> 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 well:

Company Mentioned

Mention Thumbnail
featured image - The sleepy for loop in Go
Felix Geisendörfer HackerNoon profile picture
Felix Geisendörfer

Felix Geisendörfer

@felixge

L O A D I N G
. . . comments & more!

About Author

Felix Geisendörfer HackerNoon profile picture
Felix Geisendörfer@felixge

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Samtigis