paint-brush
Don't Make These 5 Golang Mistakesby@josie
2,113 reads
2,113 reads

Don't Make These 5 Golang Mistakes

by Ali Josie7mNovember 14th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

There are several ways to make a mess inside a loop which you need to be aware of. These are mistakes that I’ve made writing Go. Don't Make These 5 Golang Mistakes: Using reference to loop iterator variable is a single variable that takes different values in each loop iteration. Using defer in loop can only be unblocked, when at line 5 is invokedtimes, since it is used as parameter to callat line2. Sending into an unguaranteed channel may become a channel that suffers no fools. You shouldn’t usein a loop unless you’re sure what you are doing.

Company Mentioned

Mention Thumbnail
featured image - Don't Make These 5 Golang Mistakes
Ali Josie HackerNoon profile picture
Ali Josie

Ali Josie

@josie

Software Engineer at Harlem Next

About @josie
LEARN MORE ABOUT @JOSIE'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Ali Josie HackerNoon profile picture
Ali Josie@josie
Software Engineer at Harlem Next

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