Lesson 0: Hello Gophers

Install Go Before we can begin writing Go code we’ll need to, would you believe it? Install Go Install Text Editor If you already have a text editor of choice, then you can skip this step. If you don’t know what a text editor is, then let me explain. Software Engineers are modern day wizards. goroutines-14 by Maria Letta- License How so? We can make updates anywhere in the world 🌍 to a piece of software and everywhere in the world 🌎 🌏 is affected....

Lesson 1: Types

Types are the building 👷 blocks 🧱 of all applications. They are like the words in the English language. We use words 💬 to make sentences and sentences to make paragraphs 📄 We use types ✨ to declare variables and variables to make functions 🦾 Setup Let’s make our directory types and the files we want inside of that directory example_test.go types.go mkdir types touch types/example_test.go types/types.go Now let’s open up types....

Lesson 2: Variables

A Variable is something that can inherently change 🧑 ➡️ 🧓 To be variable means to be adaptable or changeable 👩 🔄 👨 You may think of it as varied or versatile; saying 🗨️ I’m adaptable is the same as saying🗨️ I’m variable We can take the types we learned about in the previous lesson and put them into something we name and can change the value of. A variable! So in programming, a variable is a type value with a name that can change it’s value....

Lesson 3: Constant

Constants are variables that cannot be changed. If you have taken any math or physics classes you’ve probably used a constant before. Pi 🥧 π is a constant and the speed of light 🔦 c is a constant. Here’s a quick overview of why we love ❤️ constants as developers: Readability 📖 – Removes magic numbers from code Flexibility 🧘 – untyped constants Safety 🦺 – Never changes and can be used everywhere!...

Lesson 4: Operators

The name operator can sound intimidating, but trust me when I say it’s really simple. Lets say we have a soccer player ⚽ and they kick the ball. What would you call them? A kicker! And what about something that cooks rice? 🍚 A cooker! And what about a zombie that doesn’t do anything else but walk around? A walker!!!!! 🧟💥🔫💥🔫💥🔫 GET ‘EM I think you see the point. If we have a thing that does something repeatedly we put “-er” on the end of it....

Lesson 5: If/Else

I’ll give you two options, if you follow this lesson then you’ll learn about control flow in programming else you’ll never know how to control the execution of your code 💀 Setup Let’s make our directory if_else and the files we want inside of that directory example_test.go if_else.go mkdir if_else touch if_else/example_test.go if_else/if_else.go Now let’s open up if_else.go and for the very first line we’ll add package if_else Next for example_test....

Lesson 6: Switch

A switch statement is made up of case statements and if necessary a default statement, if none of the case statements match. We can think of switch as being a more versatile if/else statement. We have the ability to do everything the same as if/else statements with a clearer and possibly more pointed statement. We prefer a switch over an if/else in Go, if possible. Setup Let’s make our directory switches and the files we want inside of that directory example_test....

Lesson 7: For Loop

L➿➿➿➿➿➿ps, they just go on and on. At least, that’s what we’re aiming for when we use them. 😉 In programming there are times when you have some code that looks very repetitive. (Listen carefully! 👂 This is where it starts getting fun!) func NoLoops() { fmt.Println("This is line number 1") fmt.Println("This is line number 2") fmt.Println("This is line number 3") fmt.Println("This is line number 4") fmt.Println("This is line number 5") } Look at all that repeated code!...

Lesson 8: Arrays

In programming there is the One and the Many. One tree with Many branches. One string with Many rune or byte types. One array to Many values. In programming we commonly refer to these as collection types, because they collect all the things! You can think of a fruit basket. It collects all the fruits [ 🍎, 🍐, 🍌 🍍, 🍓 ] or a zoo collects all the animal [ 🐒, 🦛, 🐴, 🐼, 🦫, 🦒 ]...

Lesson 9: Slices

We just got done speaking on arrays and it’s a perfect time to start talking about slice. The more versatile versions of arrays. This is because we don’t have to declare a size to a slice. Slices can grow indefinitely! But wait! There’s more! 😲 They also have certain global functions specific to them! And to top it all off they come with a really nice optimization for strings. Also feel free to checkout the community driven Slice Tricks !...