Go (Golang): The Complete Bootcamp
4.5 (1,575 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
11,530 students enrolled

Go (Golang): The Complete Bootcamp

Deeply understand and master the Go Programming Language (Golang) from scratch 1000+ hands-on exercises and projects
4.5 (1,575 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
11,524 students enrolled
Last updated 5/2020
English
English [Auto-generated]
Current price: $139.99 Original price: $199.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 23 hours on-demand video
  • 79 articles
  • 61 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Watch the free videos to see how I teach Go programming in depth.
  • Practice with 1000+ Exercises (with included solutions)
  • Pass Interviews: Master Go Internals In-Depth
  • Master Interfaces and Internals
  • Master Slice Internals: Slice Header and Memory Allocations
  • Master Map Internals: Map Header
  • Encode and Decode JSON
  • Create a log file parser, spam masker, retro led clock, console animations, dictionary programs and so on.
Course content
Expand all 310 lectures 23:07:27
+ Setup your Environment
5 lectures 22:54
  • In this lecture, you're going to install Go on OS X (Mac).

  • You'll also configure your code editor.

Preview 05:27
  • In this lecture, you're going to install Go on Windows.

  • You'll also configure your code editor.

Install Go on Windows
06:59

In this lecture, I'll show you:

  • How I've organized the course source-code (repository)

  • Where you can find all the exercises and the examples

Find your way in the code repository
04:31

In this lecture, I'm going to show you how you can download the source-code for the course.

Get the code for the course
05:27
+ Write Your First Go Program
31 lectures 01:28:56
Write Your First Go Program!
00:26

You will learn about:

  • What is GOPATH?
  • Where it is in your computer?
  • Best practices on where to create folders for an idiomatic Go program
What is GOPATH?
08:05

You will learn about:

  • How and where to create folders and files for your first program
  • How to use VS Code editor to create folders and files


Create folders and files
03:16

You will learn about:

  • How to code your first Go program
  • Introduction to the parts of an executable Go file
  • Package clause, main function, calling a function, and string literals
Write your first program
06:51

You will learn about:

  • What is `go build` and how to use it?
  • How to run your first program
  • How to print the documentation of Go tools
  • Integrated terminal of VS Code editor
  • How to determine whether a file is an executable file or not
Compile with "go build"
04:40

You will learn about:

  • The differences between compile-time and runtime.
  • Demonstration of Go assembly code
  • Stages of compilation and running a program from source-code to machine-code  and runtime
Learn the difference between Compile-Time and Runtime
02:13

You will learn about:

  • Differences between `go run` and `go build` tools
  • Internals of `go run` tool
  • Linker and linking
Run with "go run"
03:30

Let's make sure that you understand everything correctly.

Prove Yourself: First Go Program
6 questions
★ FIRST GO PROGRAM EXERCISES ★
00:52
⭐️ Packages ⭐️
00:11

This is an introductory lecture. It will summarize what you're going to learn in this section. Please also check the individual lecture descriptions to learn more about what you're going to learn.

Let's understand the first program
01:31

You will learn about:

  • What is a package?

  • Package rules

  • Package clause

  • Introduction to the package scope

  • Sharing the code in the same package

What is a package?
04:31

You will learn about:

  • The differences between a library package and an executable package

Don't forget to check out the cheatsheet.


Learn the differences between Executable and Library Packages
03:08
Prove Yourself: Packages
13 questions

You will learn about:

  • What is a scope?
  • What is a declaration?
  • What is the importance of names?
  • Small introduction to variables and constants
  • Packages scopes
  • File scopes
  • Block scopes
Scopes: What is the importance of names?
06:24
Quick Notice: Package Scope
00:11

You will learn about:

  • Details of package scope

  • Coding demonstration for sharing the names inside the same package

What is a package scope?
03:35

This lecture contains a small coding demonstration of using the same names within the same scope.

The same names in the same package
01:28

You will learn about:

  • What is importing?

  • The details about file scope

Importing happens in the file scope
04:15

You will learn about:

  • Demonstration of using the same names within the file scope
  • Renaming an imported package's name
Renaming imported packages
01:57
Prove Yourself: Scopes
5 questions
⭐️ Statements and Expressions ⭐️
00:10

You will learn about:

  • What is a statement in Go?
  • Go execution flow
  • Simple if statement
  • Using multiple statements in the same line using semicolons
What is a statement?
04:23

You will learn about:

  • What is an expression in Go?
  • The importance of operators in expressions
  • String concatenation operator
  • Using functions as expressions (call expression)
  • Real-World example: You'll learn how to use a Go standard library package to print how many numbers of CPUs in your machine
What is an expression?
03:53

Code along with me for a mini project using a Go standard library package.

To learn about:

  • Real-World example about the internals of a Go standard library package
  • Expressions
Print the number of CPUs
03:21
Prove Yourself: Statements and Expressions
7 questions

You will learn about:

  • What is a comment and how to use it?
  • Single-line comments
  • Multiple-line comments
  • Code along demo: Demonstrates the usage of comments
  • A few VS code features about opening files quickly using shortcuts
How Go comments work?
02:23
Quick Notice: Go Doc
00:08

You will learn about:

  • Using comments to generate documentation automatically
  • Using `go doc` tool to view the source-code of Go standard library packages
  • Demonstration of the generated documentation on the online Go documentation
What is Go Doc?
03:09
★ FUNDAMENTALS EXERCISES ★
00:13
⭐️ Write a Library Package! ⭐️
00:05

You will learn about:

  • Creating your first library package
  • Compiling your package
  • Installing your package
Create your first library package
03:56

You will learn about:

  • Demonstrations of exporting and importing

  • How to use online Go documentation to explore Go standard library package source-codes

  • Suggestions about creating your packages

How Go standard library exports?
04:34

You will learn about:

  • How to add a function to your library by exporting it
  • How to import and use your local library from an executable package
  • A pattern for creating a command in your project
  • VS Code importing features
Export a function from your package
05:18
Prove Yourself: Library Packages
5 questions
★ LIBRARY PACKAGE EXERCISES ★
00:17
+ Master the Type System of Go
81 lectures 06:10:36
⭐️ Variables ⭐️
00:35

Objectives

Roadmap
02:35
  • What's a variable?

  • How does it look?

  • Properties of a variable

Introduction to Variables
02:55
  • What's a basic data type?

  • Basic literals

  • How to use them?

Learn the basic data types of Go
07:47
Prove Yourself: Basic Data Types
5 questions
★ DATA TYPES EXERCISES ★
00:03
  • How to declare a variable

  • Parts of a variable declaration syntax

  • Naming rules

How to declare a variable?
08:05
  • What's a zero value?

  • How does it work?

Every Go type has a zero value
03:33
  • What happens when you don't use a variable that you declare

  • How to get rid of unused variable warnings

  • How to use the blank-Identifier

What is a blank identifier?
03:43

Why and How to declare multiple variables?

How to declare multiple variables?
02:50

Variable declaration examples.

Let's declare a couple of variables!
05:46
Prove Yourself: Variable Declarations
14 questions
★ DECLARATION EXERCISES ★
00:09
  • What's initialization?

  • What's Type Inference?

  • What's a short declaration?

  • Coding example

What is type inference?
06:48
  • Short declarations & Package scope

  • How to declare package-scoped variables

Why can't you short declare a variable in the package-level?
03:47
  • How to short declare multiple variables?

  • Coding example

How to short declare multiple variables?
06:10
  • What is redeclaration?

  • How to use it?

  • Coding example

What is redeclaration?
05:59
  • Recommendations about when to use a short declaration vs a variable declaration.

  • Code examples

When to use a short declaration?
06:11
Prove Yourself: Short Variable Declaration
12 questions
★ SHORT DECLARATION EXERCISES ★
00:07
  • How to change the value of a variable?

  • Rules

  • Coding example

How to assign to a single variable?
12:34
  • How to change the values of multiple variables?

  • Swapping

How to assign to multiple variables?
04:00
  • Path package

  • Path.Split function

  • Function declaration syntax

  • Using blank-identifier with multiple result returning expressions

Mini Example: Path Separator
05:31
Prove Yourself: Assignments
7 questions
★ ASSIGNMENT EXERCISES ★
00:07
  • How to change the type of a value to another type?

  • Type conversion expression syntax

  • Importance of the order of type conversions

  • Rules

Let's convert a value!
07:09
  • Importance of type names

  • Coding example

Learn the importance of type names
04:51
Prove Yourself: Type Conversion
5 questions
★ TYPE CONVERSION EXERCISES ★
00:07
  • Getting arguments from the command-line

  • os Package and os.Args

  • Introduction to Slices

  • Index expressions

⭐️ Get input from terminal ⭐️
04:54
Learn the basics of os.Args
04:06
Greet people using os.Args
04:31
Recap: Variables
05:15
Prove Yourself: Command-Line Args
7 questions
★ OS.ARGS EXERCISES ★
00:03
⭐️ Print Formatted Output ⭐️
00:05
  • How to print formatted output?

  • How Printf works

  • The mechanics of the Printf function

Println vs Printf
07:44
  • What is an escape sequence?

  • What is an escape character?

What is an Escape Sequence?
04:08
  • How to print the type of any value?

  • Examples for common verbs

  • Swiss Army Knife Verb

  • Argument Indexing

How to print using Printf?
07:47
  • Type-Safety and Printf

  • Changing the printed precision

The verbs can be type-safe too!
05:09
Recap: Let's summarize
01:33
Prove Yourself: Printf
15 questions
★ PRINTF EXERCISES ★
00:06
⭐️ Numbers and Strings ⭐️
00:14
  • What is an operator and an operand?

  • Discussion of arithmetic operators

  • Importance of type

  • Float inaccuracy

Learn the basic arithmetic operators of Go
07:34
  • Usage Examples

  • Integer and Float conversion problem

What is the result of 3/2?
06:30
Prove Yourself: Arithmetic Operators
9 questions
  • What is Operator Precedence?

  • Using parentheses in expressions

  • Changing the precedence of expressions

  • PROJECT — Celsius to Fahrenheit

★ Convert Celsius to Fahrenheit
08:19
  • What is the IncDec Statement? How it works?

  • Introduction to Assignment Operations

  • Code Along Example

What is the IncDec Statement?
06:33
  • Assignment Operations

  • CODE ALONG: Example Program

  • Remainder conversion

Calculate the area using assignment operations
04:56
  • Getting numeric data from the command-line

  • Introduction and explanation of strconv package

  • Challenge

Convert Feet to Meters
07:33
Recap: Numbers
03:13
Prove Yourself: Assignment Operations
8 questions
★ NUMBERS EXERCISES ★
00:04
  • What is a Raw String Literal?

  • String Literals vs Raw String Literals

  • Code Along Examples

What is a Raw String Literal?
06:35
  • How to combine multiple strings?

  • Using assignment operations when combining strings

  • Code Along Examples

  • Example usages of strconv package

How to combine multiple strings?
06:20
  • How to get the length of a string?

  • Interesting details about the len function

  • Calculating the length of unicode characters

  • Very gentle introduction to Runes and Codepoints

How to get the length of a string?
04:36
  • Introduction and usage of strings package

  • Getting input from the command line

  • And manipulating it using the strings package

  • String concatenation and using functions

Example: Banger: Yell it back!
04:41
Recap: Strings
02:19
Prove Yourself: Strings
11 questions
★ STRINGS EXERCISES ★
00:02
⭐️ Go Type System Mechanics ⭐️
00:06
  • Why there's a need for a type system?

  • Static vs Dynamic Type Systems

Introduction and Roadmap
03:58
  • What's a bit?

  • What is its purpose?

  • How to calculate bits using math

[For Beginners] Bits and Bytes #1
07:04
  • What's a byte?

  • What is its purpose?

  • What's the relation between bytes and bits?

[For Beginners] Bits and Bytes #2
04:50
  • What's a predeclared type?

  • The representation and size of a type

  • The table of predeclared types in Go

  • Signed and Unsigned predeclared types

  • The bitsize and its relationship with computer memory

What is a Predeclared Type?
13:02
  • How Go behaves when some data types overflow?

  • Interesting examples about wrap-around situations

Overflow: Go beyond?
08:28
Prove Yourself: Data Types
11 questions
  • What's a defined type?

  • What's an underlying type?

  • How type definition statement works?

Understand the Defined Types
08:27
  • Why you need to create a new type?

  • Understand the relationship between a defined type and its underlying type

  • Investigation of time.Duration type of Go Standard Library

Defined Types: Real-Life Example
07:27
  • How to create your own defined type?

  • Example Program: Gram to Ounce Converter

Create Your Own Types
03:04

Mechanics behind underlying types.

Underlying Types
04:15

The mechanics of underlying types using an example program.

Underlying Types: Example
08:59
  • What's an aliased type?

  • Examples about aliased types: Byte and Rune

Aliased Types: Don't use it at home
05:05
Recap: Go Type System
06:30
Prove Yourself: Defined and Underlying Types
8 questions
★ TYPES EXERCISES ★
00:03
⭐️ Untyped Constants ⭐️
00:15
Introduction and Roadmap
02:41
  • Why sometimes you need to use constants?

  • Benefits of constants

  • What's a magic number

  • How to declare a named constant?

Why might you want to use a constant?
06:08

What are the rules for constants?

Learn the rules of constants
03:09
  • Examples of typed constants

  • Examples of constant expressions

Examples of Typed Constants
03:33
  • How to declare multiple constants?

  • Interesting feature of Go Constants: Repeating types and expressions

How to declare multiple constants?
03:27
Recap: Constants
03:18
  • What's an untyped constant? (or typeless)

  • What's the benefit of using untyped constants?

  • Typed vs Untyped constants

  • How untyped constants work under the hood?

How untyped constants work under the hood?
06:23
  • What's a default type?

  • Why you need it?

  • How Go uses default types for resolving the types of untyped constants?

  • Conversion rules when using untyped constants

What is a Default Type?
07:33

Let's take a look at a real-life constant usage to learn more about how creators of Go uses constants.

Example: time.Duration
07:16
  • Let's refactor the previous project: Feet to Meters; to constants.

  • This time, we're going to add one more feature to it.

Refactor: Feet to Meters
09:08
Recap: Typeless Constants
01:02
  • What's iota? Why you want to use it? What it does?

  • Using blank-identifier in constant declarations

  • Creating a timezone table using iota and constants

What is iota?
09:53
Recap: iota
00:46
Prove Yourself: Constants
8 questions
★ CONSTANTS EXERCISES ★
00:03

"There only two hard things in computer science: Cache invalidation and Naming things."

  • The subject of this lecture is about naming things of course.

  • We're going to look at a lot of examples for properly naming your identifiers.

NOTE: This lecture is about using names in Go in general.

Naming Things: Recommendations
08:25
+ Control Flow and Error Handling
55 lectures 03:17:11
⭐️ If Statement ⭐️
00:29
Introduction and Roadmap
03:27
[For Beginners] Comparison Operators
09:14
Learn the relation between comparison and assignability
06:34
Prove Yourself: Comparison Operators
10 questions
[For Beginners] Logical AND
06:45
[For Beginners] Logical OR
05:01
[For Beginners] Logical NOT
02:43
Recap: Boolean Operators
03:53
Prove Yourself: Logical Operators
7 questions
[For Beginners] If Statement
05:12
[For Beginners] Else and Else If
03:51
Refactor: Feet to Meters
03:54
Prove Yourself: If Statement
8 questions
Recap: If Statement
01:34
★ IF EXERCISES ★
00:01
★ Pass Me: Create a Password-Protected Program
00:05
Tiny Challenge: Validate a single user
02:34
Solution: Validate a single user
07:50
Tiny Challenge: Validate multiple users
01:40
Solution: Validate multiple users
06:46
⭐️ Error Handling ⭐️
00:08
Introduction
02:10
What is a nil value?
04:27
What is an error value?
06:30
Error handling example
03:43
Challenge: Feet to Meter
00:53
Solution: Feet to Meter
03:12
Recap: Error Handling
01:36
Prove Yourself: Error Handling
10 questions
What is a Simple Statement?
04:15
Scopes of simple statements
06:13
Famous Shadowing Gotcha
05:12
Prove Yourself: Short If
3 questions
Recap: Error Handling
01:37
★ ERR HANDLING EXERCISES ★
00:05
⭐️ Switch Statement ⭐️
00:08
Introduction and Roadmap
00:59
  • What's an expression switch?

  • What's a switch condition? How it works?

  • What's a case clause?

  • What's the difference between a switch statement and an if statement?

Learn the Switch Statement Basics
09:25
What is a default clause?
03:26
Use multiple values in case conditions
02:25
Use bool expressions in case conditions
03:51
How does the fallthrough statement work?
06:52
What is a short switch?
03:00
Tiny Challenge: Parts of a Day
04:03
Solution: Parts of a Day
03:36
If vs Switch: Which one to use?
05:58
Recap: Switch Statement
02:29
Prove Yourself: Switch Statement
11 questions
★ SWITCH EXERCISES ★
00:02
⭐️ Loops ⭐️
00:07
Introduction and Roadmap
02:13
There is only one loop statement in Go
06:02
How to break from a loop?
05:23
How to continue a loop? (+BONUS: Debugging)
05:25
Create a multiplication table
05:40
★ LOOP EXERCISES #1 ★
00:01
How to loop over a slice?
05:22
For Range: Learn the easy way!
07:25
Recap: Loops
01:39
Prove Yourself: Loop
10 questions
★ LOOP EXERCISES #2 ★
00:03
+ Projects: For Beginners
11 lectures 45:17
Randomization in Go
00:07
Randomization and Go
07:08
Seed the randomizer with time
04:11
Write the Game Logic
07:30
Prove Yourself: Randomization
7 questions
★ RANDOMIZATION EXERCISES ★
00:02
Mini Project: Word Finder
00:05
Build the Word Finder Program
07:35
Labeled Break and Continue
09:08
Break from a Switch
04:09
Yes there is a "goto" statement in Go
05:18
Prove Yourself: Labeled Statements
7 questions
★ LABELED STATEMENT EXERCISES ★
00:02
+ Arrays and Memory Layout
17 lectures 01:33:33
Learn Go's Fixed Arrays
00:24
  • Until now, you were using singular values. Now it's time to learn about more advanced data types.

  • In this part you're going to learn almost everything about the composite types.

  • We're starting with the arrays, that is one of the composite types.

Introduction and Roadmap
06:09

You're going to learn:

  • What's an array

  • How Go represents an array in computer memory

  • How to use arrays

What is an array in Go?
09:19

You're going to learn:

  • What's an array

  • How Go represents an array in computer memory

  • How to use arrays

Let's create an array
04:57

You're going to learn:

  • An example usecase for arrays (cont.)

  • Using parallel arrays for representing data

  • Gotchas when using the for range clause with arrays

Learn the gotcha when using a for range on arrays
07:33
Prove Yourself: Arrays #1
10 questions

You're going to learn:

  • Composite literal declaration syntax

  • How an array literal simplifies creating new arrays

  • Useful feature of trailing commas in composite literals

  • Ellipsis syntax when declaring arrays

  • Zero values of array elements

What is a composite literal?
05:06

You're going to refactor the Hipster's Love Bookstore example to array literals.

Refactor the Hipster's Love Bookstore to array literals
06:19
  • Use arrays to print random moods from an array.

  • Learn how to use the random number generator with arrays.

Tiny Challenge #1: Moodly
02:27
Can you compare array values?
07:48

You're going to learn:

  • How Go assign an array to another array?

  • Importance of comparison when assigning arrays

  • Code along example for the copying behavior and array assignments

Can you assign an array value to another one?
06:47
★ ARRAYS EXERCISES #1 ★
00:04

You're going to learn:

  • How to use multi-dimensional arrays (array of arrays)?

  • The rules of multi-dimensional array declaration and usage

  • Simplified array literal element declaration syntax

  • Refactor a program that uses single-dimensional arrays to multi-dimensional arrays

How to use multi-dimensional arrays?
08:45
  • Refactor the previous Moodly challenge to multi-dimensional arrays

Tiny Challenge #2: Moodly
04:14

You're going to learn:

  • Rarely known feature of Go arrays: Keyed elements

  • Use keyed elements to describe the index positions

  • Hidden details of the keyed element declaration in array literals

  • Cryptocurrency exchange ratios program using the keyed elements

Learn the rarely known feature of Go: The Keyed Elements
08:46

You're going to learn:

  • The difference between named and unnamed types

  • The relation of composite types and unnamed types

  • Comparison and assignment rules of named and unnamed composite types

  • Code along usage example

Learn the relation between composite and unnamed types
10:43
Prove Yourself: Arrays #2
9 questions
Recap: Arrays
04:09
★ ARRAYS EXERCISES #2 ★
00:03
+ Project: Write a Retro Clock
7 lectures 30:15
Grab the Slides!
00:02
Challenge: Retro Led Clock
06:41

You can find the links about the detailed explanations for the challenge steps and solutions.

Challenge Explanation
00:33
Let's print the digits
07:26
Let's print the clock
06:49
★ RETRO CLOCK EXERCISES ★
00:27
+ Slices and Internals
26 lectures 02:11:27
Slices: Master Go's Dynamic Arrays
00:24

Let's see what you're going to learn in this section.

Introduction and Roadmap
03:09

You're going to learn the differences between slices and arrays.

Learn the differences between slices and arrays
06:00

You're going to learn:

  • The differences between slices and arrays

  • Comparing and Assigning Slices

  • Nil Slice vs Empty Slice

  • Using the Length of slices when comparing

  • Arrays, slices and the Go Standard Library

Can you compare a slice to another one?
10:15

You're going to learn:

  • The differences between slices and arrays

  • A use case for a slice

  • Refactoring the program from arrays to slices

  • A very gentle introduction to the append function and the slice expressions

  • Arrays, slices and the Go Standard Library: sort.Ints function

Create a unique number generator
07:14
Prove Yourself: Slices vs Arrays
10 questions
★ SLICE EXERCISES ★
00:07

You're going to learn:

  • The usage of the built-in append function

  • The return value of the append

  • Appending multiple elements and a slice

  • Simple TODO list example using appends

Append: Let's grow a slice!
07:25
Prove Yourself: Appending
5 questions
★ APPEND EXERCISES ★
00:08

You're going to learn:

  • What is a sliceable value? 

  • How the slice expressions (slicing) work?

  • What is reslicing?

Slicing: Let's cut that slice!
09:33

You're going to learn:

  • How to create pagination using slice expressions?

  • How the sprintf function works?

How to create pagination using slices? (+ Sprintf)
04:47
Prove Yourself: Slicing
9 questions
★ SLICING EXERCISES ★
00:03
⭐️ Slice Internals ⭐️
00:10

You're going to learn:

  • How do slices work under the hood?

  • What's really a slice?

  • What's a backing array?

  • How Go represents the backing array in computer memory?

What is a Backing Array?
10:45
Prove Yourself: Backing Array
9 questions

You'll understand what a slice value actually is:

  • How a slice value is stored?

  • What's a slice header? What does it do?

  • What's the pointer field of the slice header?

  • Does nil slice have also a slice header?

Preview 05:28
  • What does a slice header (or slice value) looks like in the actual Go runtime code?

  • When you pass a slice to a function, what gets passed actually?

  • How about an array? Do they work like the same when they're copied?

What does a slice header look like in the actual Go runtime code?
07:28
Prove Yourself: Slice Header
6 questions

You will understand what the capacity of a slice means.

  • Why the capacity of a nil slice is zero?

  • What's the difference between the length and the capacity of a slice?

  • What's the role of the slice header's pointer field? Why is it related to the capacity?

  • How can you extend a slice using its capacity?

  • How to use the cap function?

What is the capacity of a slice?
05:09
  • Understand when to use parallel slice values.

  • What's a dummy backing array? What is their role?

  • Extend an empty slice using its capacity inside a loop.

Extend a slice using its capacity
06:03
Prove Yourself: Capacity
6 questions

You're going to learn:

  • The relationship between the backing array and the append function.

  • When does the append function create a new backing array?

When does the append function create a new backing array?
07:16

The full demonstration of the append function when allocating backing arrays.

Animate: When the backing array of a slice grows?
06:17
Prove Yourself: Mechanics of Append
4 questions
★ SLICE INTERNALS EXERCISES ★
00:25
⭐️ Advanced Operations ⭐️
00:09

Understand when to and how can you use the full slice expression to limit the capacity of a slice.

Full Slice Expressions: Limit the capacity of a slice
06:03

Understand when to and how to use the make function to pre-allocate backing arrays for slices.

make(): Preallocate the backing array
09:22
  • You will learn how to copy the slices without using a loop.

  • You will learn when to and how to use the copy function.

copy(): Copy elements between slices
07:39
  • You will learn how the multi-dimensional slices work.

  • You will understand their differences than multi-dimensional arrays.

  • You will learn how to initialize inner slice elements using the make function.

How to use multi-dimensional slices?
09:18
Prove Yourself: Advanced Slice Operations
9 questions
★ ADVANCED SLICE OPS EXERCISES ★
00:48
+ Project: Write a File Finder
5 lectures 14:33
Build an Empty File Finder Program
00:16

You're going to learn:

  • How to get the names of all the empty files from a directory

  • This is the first part of the project, in the next lecture, you're going to use the append function to write the names of the empty files to a file.

Preview 05:27

You're going to learn:

  • How to write to a file using a byte slice

  • How to calculate file permissions using octal numbers

Write to a file
04:28

We're going to optimize the program using the make function.

Optimize!
04:15
★ FILE FINDER EXERCISES ★
00:07
+ Project: Animate a Bouncing Ball
7 lectures 26:35
Project: Animate a Bouncing Ball
00:29
  • Let's learn what the bouncing ball program is going to look like.

Challenge
04:10
Challenge Document
01:32
  • Learn how to draw the board using a multi-dimensional slice

Step #1: Create and Draw the Board
06:26
  • Learn how to optimize the program adding a slice as a buffer

  • How to add a buffer and reuse it instead of doing a lot of system calls

  • How to simply measure the execution speed of a program

Step #2: Optimize by adding a Buffer
07:02
  • Calculate the ball position using velocity and collision detection

  • Complete the program by animating the ball

Preview 06:21
★ BOUNCING BALL EXERCISES ★
00:35
Requirements
  • Access to a computer with an internet connection.
Description

Get a Real In-Depth Understanding of Go and its Internal Mechanisms by:

  • Ultra-detailed, entertaining, intuitive, and easy to understand animations.

Learn by doing:

  • Write a log parser, file scanner, spam masker and more.

  • Solve 1000+ hands-on exercises.

  • Learn a lot of tips and tricks that you can't find easily anywhere else.

What's included?

  • Go OOP: Interfaces and Methods

    • Internals of Methods and Interfaces

    • Functions and Pointers: Program design, pass by value, and addressability.

    • Implicit interface satisfaction

    • Type assertion and Type Switch

    • Empty interface: []interface{} vs interface{}

    • Value, Pointer, and Nil Receivers

    • Promoted Methods

  • Famous Interfaces

    • Tips about when to use interfaces

    • fmt.Stringer, sort.Sort, json.Marshaler, json.Unmarshaler, and so on.

  • Composite Types: Arrays, Slices, Maps, and Structs

    • Internals of Slices and Maps

    • Backing array, slice header, capacity, and map header

    • JSON encoding and decoding, field tags, embedding

    • Make, copy, full Slice expressions and append mechanics

    • UTF-8 encoding and decoding

  • Go Type System Mechanics

    • Type inference, underlying, predeclared, and unnamed types.

    • Untyped constants and iota.

    • Blank Identifier, short declaration, redeclaration, scopes, naming conventions

  • I/O

    • Process Command-Line Arguments, printf, working with files, bufio.Scanner, ...

  • How to create your own Go packages

    • How to run multiple Go files, and how to use third-party packages

  • Go tools

    • Debugging Go code, go doc, and others.

  • ...and more.

Why Go?

Go is one of the most desired, easy to learn, and the highest paying programming languages. There are 1+ million Go programmers around the world, and the number is increasing each day exponentially. It's been used by Google, Facebook, Twitter, Uber, Docker, Kubernetes, Heroku, and many others.

Go is Efficient like C, C++, and Java, and Easy to use like Python and Javascript. It's Open-Source, Simple, Powerful, Efficient, Cross-Platform (OS X, Windows, Linux, ...), Compiled, Garbage-Collected, and Concurrent.

Go is best for Command-line Tools, Web APIs, Distributed Network Applications like Microservices, Database Engines, Big-Data Processing Pipelines, and so on.

Go has been designed by one of the most influential people in the industry:

  • Unix: Ken Thompson

  • UTF-8, Plan 9: Rob Pike

  • Hotspot JVM (Java Virtual Machine): Robert Griesemer

Who this course is for:
  • Beginners who have never programmed before.
  • Programmers switching languages to Go.
  • Intermediate Go programmers who want to level up their skills!
  • Intermediate Go programmers who want to learn the internals of slices, maps, interfaces, and so on.