Lesson 10: Maps

Time for maps! 🗺️ and just like maps we use to point to specific locations in the world, a map in Go is no different! We use a key to point to a value. In other languages they are called Dictionaries, Hash Tables, or Associative Arrays. Wikipedia provides us with a showing of just how timeless ⏳ this data structure truly is. Setup Let’s make our directory maps and the files we want inside of that directory example_test....

Lesson 11: Range

The range keyword works the same way we use it in speech. Example 1 Friend Asks: What are your feelings on all of the Star Wars movies? You say: Eh, my feelings range from hot garbage to best movies of all time. Example 2 If you come to my town we have a huge range of restaurants 🌮🍙🍺🍲 🥙 to choose from. Example 3...

Lesson 12: Runes

Maybe it’s the nerd in me 🤓 but when I hear rune my mind goes to the dragon-born 🐲 FUS-RO-DAH!! 🌬️ Just me? 🙃 anyways, time to level up ⬆️ on our rune game. It cannot be overstated. A rune is an int32. Plain and simple. The type is there to help guide us into understanding it is an int32 specifically for strings, but it’s an int32, yeah? Well, 🤔 Maybe we can step back and find out what it means to be int32 and then understand how runes fit into that....

Lesson 13: Function

It’s time for the FUNC 🪩🕺 Can you handle it? Function that is and of course you can handle it! 😄 We’ve been using them this entire time. We’ve needed some preliminary exposure to other keywords before we can dig into function. So let’s get func-y 😹 and boogie on down to our next lesson. In it’s purest form a function takes in zero to many inputs and produces one to many outputs....

Lesson 14: Struct

Data structure aka struct is used to group like data together. For example humans are made up of data. 😯 And not only are humans made up of data, 😮 that data can be seen in different views! 😲 What do I mean by this? Think about it from a doctor’s perspective, what might a doctor take data about? 🤔 Your temperature, your weight, your height, blood pressure, etc. Now what data does a bank collect from a person?...

Lesson 15: Pointer

Pointers in nutshell 👆👆👆 TA-DA!!!! Now you get pointers! 😂 Seriously though, it’s that easy. I remember the first time I was introduced to pointers they seemed so mystical and hard to understand, but trust me when you get it, you get it. Let’s Go 😹 get it then! A pointer points to 👉 something. There are thousands of pointers that point to you. Are you on social media (IG 📷 FB 📖 TW 🐦 TT 🎵 🔗in, Snap👻)?...

Lesson 16: Method

There’s a good chance you’re coming from another programming language while reading this and if that’s true, it must be explicitly said: Go does not support Object-Oriented Programming (OOP). Sorry not sorry 🙃 I say that because it has been stated (and argued 😂) time - and - time - again That inheritance belongs in the bin 🗑️ Now don’t get me wrong Abstraction? ✅ We got that Polymorphism?...

Lesson 17: Interface

The word interface sounds intimidating 😰 and some explanations can be more harmful 🤕 than helpful. Even worse there are plenty of definitions of interface in software engineering and in programming languages😩 but we’re not going to look at a rigorous definition of what interface means. Nor are we going to cover how other languages define their interface. We’re Go-ing 😹 to keep it as simple and easy as possible....

Lesson 18: Embed

Embedding is what’s done to diamonds 💎 when they are put in a ring 💍 You take something and place it deeply within something else. So that it becomes a part of it. Maybe you’ve embedded your phone case to your phone? 📱 I know I have, the thing’s impossible to get off! Setup Let’s make our directory embed and the files we want inside of that directory example_test.go embed.go...

Lesson 19: Errors

🤖 🚨🚨 ERROR 🚨🚨 🤖 🚨🚨 ERROR 🚨🚨 🤖 This is not a drill we’re going down❗ The story’s 📖 coming to a close❗ The application 🖥️ is going to crash❗ – Calm down ❗❗ This is no time to panic . Like any Gopher worth their salt, we’ll handle our error gracefully. What’s an error in Go and why should we handle it gracefully? Let’s start with the first question....