Lesson 20: Defer

Sometimes we have to postpone things, like that trip to Hawaii 😎 🏖️ or buying the tickets to that big game 🏟️ or cleaning up the house 🧹 or waiting for a 💲Big Sale💲 on our favorite items. This is what’s known as deferring. You can also defer to someone else for their advice, like if someone asks 🗨️ “Why’s the sky blue?” – I would say 💬 “Uhhh 😅, I defer to my high school science teacher....

Lesson 21: Panic & Recover

goroutines-5 Maria Letta- License IT’S NOW TIME TO panic 😱 AHHHHHHHHH! – But wait, before we completely lose our 💩Let’s take a deep breath in 🧘 to recover and exhale 🌬️ So if the name didn’t give it away, a panic is about as bad as it gets in Go. This is the absolute worst situation to find yourself in because it means your program has done something unspeakably horrible 😈 Which is usually a SIGSEGV aka “Seg Fault” aka “Segmentation Violation” and that means it tried to access memory 🥸 that didn’t belong to it 👺 Just like in real life, if you take something that doesn’t belong to you, 👹 you’re going to have to pay the consequences....

Lesson 22: Closure

Precious gems ⚪ tucked deep inside; created in closed off environments. Yes that’s right Closures!!!! What…? 🤨 You were thinking pearls? Well, they might as well be with how useful closures are! 😁 But before we get ahead of ourselves, what is a closure? 🤔 Essentially it’s a function and that’s it. Simple right? We’ve already covered those . Now the thing that trips up plenty of developers, new and old, is Go supports first class functions....

Lesson 23: Concurrency

Let’s Get Go-ing with Concurrency! Go has very, very, good support for concurrency. No matter what programming language you are coming from, this is a good time 🕐 to sit down and read 👓 because you’re going to learn something new … Unless you’re coming from Erlang in which case you’ve got concurrency down 👍 and could teach me something about it 😂 Though the code examples will still be useful to see how it’s done in Go....

Lesson 27: Enums

Enumerations! 👻 Scary looking word, but don’t worry, we’ll list it out 🗒 step by step 👣 until we’re done. One example after the other 🔢 until we’ve exhausted them. 😹 An enumeration or better yet an enum is a collection of values, usually an int type of a certain size (uint8, int64, …), that allow us to concentrate on what we deem as important values and they’re awesome ! 😁 👍...