
Install the Go runtime to enable building and running code. Use VSCode (optional) for strong Go integrations, then start a first project to explore language features.
Install the Go runtime and verify it in the terminal with the go command, then download and install Visual Studio Code to work with Go.
Install the Go language extension in VSCode, configure the editor for Go, install analysis tools when prompted, and enable code analysis for Go files.
Launch a first Go program by creating a Hello World project, writing package main with import fmt and fmt.Println, and prepare to run it while deep-diving into compilation.
Explore a tiny go program line by line to answer five basic questions about running code, package main, imports, and go code organization, using go run and go build.
Explore Go packages and the role of package main. Distinguish executable packages from reusable ones and explain why main yields a runnable file and how to declare it.
Learn how import statements grant your main package access to standard library and third party packages, such as the fmt package for printing and debugging, and explore golang.org/pkg docs.
Explore how to structure a Go program by defining functions with func, organizing code in main.go, and using packages and imports like fmt to create a clean, reusable project pattern.
Launch a new deck project in Go, building functions to create a deck, print cards, shuffle, deal hands, and save or load decks from the hard drive using design patterns.
Set up a Go project by creating a cards directory, adding main.go, and writing a basic executable with package main and a main function to run the program.
Create and print a string variable in Go using var card string and fmt.Println. Learn Go's static typing, type inference with :=, and how compile warnings guide variable declarations.
Learn go’s short variable declaration with :=, infer types, and create functions that return a specific type such as string. Understand how type errors guide you to adjust function signatures.
Learn how Go handles arrays and slices, distinguishing fixed-length arrays from growable slices. Use range and for loops to append cards and print each element.
Explore Go's approach to the cards project by defining a deck as a slice of strings, adding methods with receivers, and organizing code in deck.go and deck_test.
Define a new deck type as a slice of strings and add a print method to display each card, replacing standard slices with the deck for reusable behavior.
Learn how Go uses a receiver to attach methods to a type, enabling deck variables to call print; understand the receiver d, the deck type, and related conventions.
Learn to implement a newDeck function in Go that returns a deck, uses slices for suits and values, and uses nested for loops to append cards and test.
Explore Go's slice range syntax to split a deck into a hand and the remaining cards, using start inclusive and end exclusive behavior.
Learn how to implement a Go deal function that returns two decks via multiple return values, slicing the deck by hand size and testing in main.go.
Save a deck to the local hard drive by converting it to a byte slice and writing it with ioutil.WriteFile, including file name, data, and permissions.
Learn how to convert a deck (a slice of strings) to a string, then to a byte slice, using type conversion and a receiver-based toString function for saving to disk.
Implement deck.toString to convert the deck to a slice of strings and join them into a comma-separated string with strings.Join, importing strings and testing via main.go.
Define a deck method saveToFile to write its toString data to a file using ioutil.WriteFile with a filename, byte conversion, 0666 permissions, and error handling.
Read a deck from disk in Go with ioutil.ReadFile, handle errors, convert the byte slice to a string of cards separated by commas, and reconstruct the deck with newDeckFromFile.
Learn Go error handling by converting a byte slice to a string, splitting by commas with strings.Split, creating a deck, and handling missing files with if err != nil.
Learn to implement a deck shuffle by looping the slice, using rand.Intn to pick a position, and swapping elements to randomize order.
Learn how to make random number generation truly random in Go by seeding the rng with a time-based seed using rand.NewSource and rand.New, ensuring each run yields a different shuffle.
Learn how to write tests in Go by creating _test.go files and using go test to verify deck.go, with deck_test.go and package main setup.
Identify tests for Go by focusing on newDeck’s behavior: deck length, first card, and last card. Learn to write TestNewDeck with the testing framework and run tests using go test.
Write Go test to assert deck elements in a slice, verifying the first card equals ace of spades and the last equals four of clubs, using T.Error for failure messages.
Explore testing file I/O in Go by validating saveToFile and newDeckFromFile for a deck, handling cleanup with os.Remove, and addressing edge cases to ensure reliable tests.
Review the deck.go implementation, defining a deck as a string slice with a deck constructor and a print method, and explain why deal uses a non-receiver parameter to avoid ambiguity.
Create a Go project with package main, a main function, and a slice of ints 0–10; iterate with a for loop and print even or odd using the modulus operator.
Create a Go program with a main function, a slice of integers 0 through 10, and a for loop that prints whether each number is even or odd using fmt.
Explore structs in Go by replacing string cards with a card struct containing suit and value, and experiment with a small main.go project to understand their use.
Learn how to define and use a Go struct representing a person, with first name and last name as string fields, and create values of that type in code.
Learn how to declare a person struct in Go, create instances with ordered fields and with named field initializers, and print struct values using fmt.
Update struct values in Go by assigning fields by name, exploring zero values for strings, numbers, and bools, and editing fields with dot notation to produce a populated struct.
Learn how to embed a contact info struct inside a person struct in Go, using embedded custom types, with email and ZIP code fields, and reuse across entities.
Learn how to embed structs and use receiver functions in Go, including simplifying fields with contactInfo, printing a person, updating names, and setting up a foundation for pointers.
Explore how Go passes structs by value, why updating a copy doesn't affect the original, and how pointers enable in-place updates.
Explore how Go pointers work by using the ampersand to obtain a memory address and the asterisk to dereference a pointer, updating a struct's fields through a pointer receiver *person.
Explore how ampersand and star create and dereference pointers in Go, and how a value can be used with a pointer receiver via automatic conversion to a pointer.
Explore how Go passes by value and why slices can modify the original data inside a function, unlike structs, revealing a key pointers gotcha.
Go treats slices as reference types: copying a slice duplicates the header while both copies share the same underlying array, unlike structs.
Explore maps in Go as a collection of key-value pairs, with statically typed keys and values, and compare them to structs while learning literal declaration and usage.
Learn multiple ways to declare and initialize maps in Go, including var and make, use square brackets for access, and understand their zero-value behavior.
Explore iterating over a map in Go by declaring a map[string]string, using for range to access each key and value, and printing color codes, with a compare to structs.
Explore how maps and structs differ in Go: maps require uniform key/value types and support iteration, while structs hold diverse field types, are not iterable, and are value types.
Explore how interfaces in Go enable code reuse by decoupling behavior from types, shown through English and Spanish bots and a getGreeting and printGreeting pattern.
Build two custom Go types, English bot and Spanish bot, each with get greeting and print greeting, to show how interfaces enable reusing logic across different bots.
Refactor a Go program to use an interface named bot with get greeting, so English and Spanish bots share one print greeting function and print hi there and hola.
review the concept of interfaces in Go by examining getGreeting, englishBot, spanishBot, and the bot interface, along with interface syntax, multiple methods, and the distinction between concrete and interface types.
Go interfaces are not generic types; they are implicit contracts that keep code concise. Remember garbage in equals garbage out and study the standard library to understand interface behavior.
Explore how interfaces work in Go by building a small HTTP program using the net/http package to perform a GET request to google.com, and handle the response and errors.
Learn how to fetch a web page with http.Get, inspect the response, and extract the HTML body using io.ReadCloser and interfaces in Go.
Learn how a response body uses the ReadCloser interface, built by combining Reader and Closer, to allow any type that implements Read and Close to fill the body field.
Review how interfaces define a getGreeting string and enable code reuse with printGreeting for englishBot and spanishBot, then preview why the reader interface saves even more code.
Explore how the reader interface unifies input from diverse sources into a common byte slice, saving code and enabling consistent handling across Go programs.
See how the reader interface abstracts input sources and how a request body implements it, using the read function and a byte slice.
Learn to use the Reader interface and its Read function by creating a large byte slice with make, reading the response body data, and printing the result as a string.
Learn how the writer interface works in Go by using io.Copy to stream resp.body data to stdout, turning a reader into terminal output and mastering Go concepts.
Learn how the writer interface works and how io.Copy copies data from a reader to a writer, using a response body and os.Stdout as concrete examples.
Explain how go's io.copy transfers data from a reader to a writer using a 32 times 1024 byte buffer and the copyBuffer helper, illustrated by inspecting the source code.
Create a custom type that implements writer interface, with a Write method that takes a byte slice and returns the number of bytes written and an error, used by io.Copy.
Build two shape types, triangle and square, each with a getArea() float64 method, and use a shape interface with printArea to compute and print the area.
Explore implementing shapes in Go using interfaces: define triangle and square with base, height, or side length; implement getArea; create a shape interface; print areas.
Explore hard mode interfaces in Go by reading a local file and printing its contents to the terminal, using the standard library's os package and command line arguments.
Demonstrates reading a file from the command line in Go by opening with os.Open and using io.Copy with the reader interface to stdout. Includes error handling and building the executable.
Explore how to build a website status checker in Go, starting with a naive HTTP GET loop and then introducing channels and goroutines to handle concurrency.
Explore a Go program that iterates over a URL list, calls a check link function to perform http requests, and prints whether each site is up or down.
Move from a sequential link checker to a parallel one by launching each URL request concurrently with goroutines and channels, and print the status as responses arrive.
Discover how Go routines enable concurrent HTTP requests by prefixing function calls with the Go keyword, letting the main routine spawn multiple checkLink calls while each request blocks independently.
Launch go routines with the go keyword and observe the go scheduler on one CPU core. Understand concurrency versus parallelism and how main and child go routines handle blocking calls.
Learn to spawn go routines for concurrently fetching multiple urls and use a typed channel to synchronize the main routine with child routines until all fetches finish.
Coordinate goroutines in Go using typed channels to prevent the main routine from exiting prematurely. Create a channel with make chan string, and use send and receive syntax to communicate.
Explore blocking channels in Go by tracing how main waits for messages from goroutines, how the first response prints, and how multiple results can cause hangs without proper handling.
Refactor channel receives into a count-based for loop, illustrating that receiving from a Go channel blocks until a message arrives, then exits after all messages are consumed.
Learn to transform a Go program into a continuous status checker by using channels and goroutines to repeatedly fetch links, spawning new checks after each completion.
Refactor a for loop to use range over a channel for clearer control flow, spawning goroutines to check links as values arrive and discussing a desired pause between fetch attempts.
Insert a pause before re-fetching a link by using time.Sleep with a duration. Keep the main routine from blocking channel C and avoid throttling when multiple go routines fetch links.
Learn how to use a function literal (anonymous function) to delay checks in a goroutine, pausing five seconds with time.Sleep before calling checkLink, and resolve range variable capture issues.
Explore Go channels and goroutines, focusing on range variable capture in function literals and how passing values as arguments prevents sharing variables across goroutines.
Go is an open source programming language created by Google. As one of the fastest growing languages in terms of popularity, its a great time to pick up the basics of Go!
This course is designed to get you up and running as fast as possible with Go. We'll quickly cover the basics, then dive into some of the more advanced features of the language. Don't be tricked by other courses that only teach you for-loops and if-statements! This is the only course on Udemy that will teach you how to use the full power of Go's concurrency model and interface type systems.
Go is designed to be easy to pick up, but tough to master. Through multiple projects, quizzes, and assignments, you'll quickly start to master the language's quirks and oddities. Go is like any other language - you have to write code to learn it! This course will give you ample opportunities to strike out on your own and start working on your own programs.
In this course you will:
Go is one of the fastest-growing programming languages released in the last ten years. Get job-ready with Go today by enrolling now!