
Learn the Go programming language from Google, covering the basics, modern features, clean syntax, and a robust, well-documented common library for building reliable software.
Learn Go programming language to build modern applications with concurrency and connectivity, as used in Docker and Kubernetes; follow along, write code, and get up and running as a beginner.
Set up your Go development environment by installing the Go SDK from go.dev, installing Git, and selecting an IDE such as Visual Studio Code with the Go extension or Goland.
Discover the Go program structure from package main and imports to the main function and fmt.Println output, and learn go run, go build, and go tool workflows.
Calculate the mean of two integers in go and print values and types. Explore integer and float types, type inference with :=, and the strict go type system.
Explore conditionals with if and switch, including initialization in if and the use of logical operators. See naked switch, default cases, and practical examples of range checks and out-of-range alerts.
Explore Go's for loops in various forms, including traditional, while-style, and infinite loops. Learn using break and continue to control flow, with examples that print sequences and demonstrate inner increments.
Solve the fizzbuzz problem by printing numbers 1 to 21, replacing multiples of three with fizz, multiples of five with buzz, and both with fizzbuzz using modulo.
Implement a Go program that uses a main loop from 1 to 20 to print fizz, buzz, or fizzbuzz based on divisibility by 3 and 5, or the number.
Learn string basics in Go: declare and print strings, measure length with len, slice and concatenate, and use lowercase and raw backtick strings for Unicode and multi-line text.
Determine and count even-ended numbers, where the first and last digits match, that are products of two four-digit numbers; demonstrate number-to-string conversion with sprintf and %q in Go.
Iterate pairs of four-digit numbers in Go, prevent duplicate counting, compute their product, convert it to a string, check if first and last letters match, and print the count.
Explore slices in Go by printing and indexing a string slice, using len, formatting with %v and %T, iterating with for and range, accessing index and value, and appending elements.
Explore how maps work in Go by mapping string keys to float64 values in a stock portfolio, including creation, retrieval, existence checks, updates, deletion, and iteration.
Count word frequencies by splitting text into words, converting them to lowercase with strings.ToLower, and printing the resulting map as part of a Go programming assignment.
This lecture demonstrates counting word frequencies in Go by converting text to words, lowercasing, updating a map with counts, and printing the results.
Explore Go functions as building blocks for modular and reusable code, defining functions with the func keyword, parameters, and return values, including returning multiple values like quotient and remainder.
Compare Go parameter passing: values are copied, but slices act like pointers, enabling in-place modification. Use pointers (with ampersand) to update data, and optional unsafe tricks from C++.
Go functions can return multiple values, enabling error handling with a zero value on error and fmt-created errors; defer ensures resources release in reverse order.
Define a budget struct to group fields like balance and expiration time, then access fields with dot notation and implement methods with value and pointer receivers.
Learn how to create structs in Go with a New function that returns a pointer and an error, validating campaign ID, balance, and expiration, and understand Go's escape analysis.
Explore how the shape interface defines an area method, implemented by square and circle, to sum areas; see generics with ordered types to implement a min function.
Learn idiomatic Go error handling: treat errors as values, wrap with context to enable stack traces, and use defer and recover to guard resource reads, logging setup, and panics.
Explore how goroutines enable lightweight concurrency in Go by running parallel URL fetches, synchronized with a wait group, and observe a dramatic speedup from serial to concurrent execution.
Channels in Go are typed one-directional pipes for goroutine communication; they block on send or receive, can be closed for range loops, and buffered channels allow non-blocking sends.
Explore Go's select for multiple channels and timeouts, and the context package for deadlines and cancellations, with a real-time bidding example and a default bid on timeout.
Manage go dependencies with go modules and go.mod, and explore testing, table-driven and subtests, plus benchmarking and profiling with built-in tools and graphviz for visualization.
Learn how to serialize and deserialize JSON in Go using the encoding/json package, decode from a reader, encode responses, and make HTTP GET and POST requests with JSON using net/http.
Learn how to guard external calls in Go by using context with a timeout and io.LimitReader to cap response size, demonstrated with net/http and a sample request.
Learn to build a production-ready http server with net/http, define health and math handlers, decode json requests, perform operations, encode results, and route endpoints using a simple Go server.
Discover Go programming language basics, concurrency support, and practical recipes for common tasks, including text files and structs, while setting up the Go SDK, Visual Studio Code, and Go tools.
Learn to compute mean and median for integer slices in Go, using float64 for division, and understand slice semantics and copying to avoid side effects.
Count word frequency in text using a map by iterating over words and incrementing counts. Use the zero value for missing keys and the comma ok idiom to check existence.
Master go error handling by stopping and deleting a docker database container, validating its id (12 or 64 chars), and executing the stop and delete sequence with robust error reporting.
Learn how to use defer to close files and flush writers, write items to a file safely, and guard against panics with recover and error handling.
Write a Go filter function that takes a predicate (int to bool) and a slice of values, returning only elements for which the predicate returns true.
Define a function that starts with an empty output slice, applies the predicate to each value, appends when the predicate is false, and returns the output slice.
Learn go string formatting and unicode handling by using formatting verbs, printing trades, and counting characters with utf8, including alignment and padding techniques.
Explore case insensitive comparisons in Go by using a letter struct with a Greek symbol and English name, iterating a letters slice, returning the match or an error.
Parse a ledger line into a transaction using regular expressions in Go and implement a grep-like function that returns lines containing a term.
Create a function that counts how many times each go sub command appears in a file, returning a history map of command names to counts and any error.
Compile a regular expression, scan a file line by line, extract a sub command from the regex group, and count frequencies in a map.
Define and use Go structs to model home automation events, embed shared fields, implement methods with pointer receivers, and leverage interfaces to print sensors like thermostats and security cameras.
Explore the empty interface in Go to handle multiple types with type switches and assertions, then implement iota-based log levels and a Stringer for readable output.
Build a painting program in Go that models circles and rectangles with locations x and y, color, and radius, drawing onto an image canvas via a device and png output.
Explore building a Go drawing system by defining a shared shape, embedding it in circle and rectangle, calculating bounding rectangles, and rendering pixels on a canvas.
Explore how go's encoding/json handles json with unmarshal and marshal. Decode weather station json into a record struct using exported fields and json tags.
Parse a complex json response in go using anonymous structs and json tags to compare per-station last check times against a global time and print lagging station names.
Learn how to marshal JSON in Go by implementing the json.Marshaler interface for custom serialization, using a quantity type with value and unit encoded as a string.
Explore handling zero values and missing fields in go by using a line item with a default quantity of one, and override it via json data while validating positivity.
Learn to handle arbitrary JSON in Go by using mapstructure to decode a map[string]interface{} into job structs, switch on type, and route to start or status handlers.
Post metrics from go to a server using json payloads, with httpbin testing, a three-second context timeout, and handling headers, status, and a json response via limit reader and decoder.
Learn http authentication with basic and token methods, set the authorization header, and build an http server that accepts and returns json metrics (host, time, cpu, memory)
Build a rest api in go with gorilla/mux, extract ISBN from the path, fetch the book from the database, return json responses with content-type application/json, and enforce the get method.
Explore building a Go in-memory key-value store with a gorilla router, including set, get, and list operations guarded by a read-write lock, plus client and server setup.
This solution builds a key-value server with router-based set and get handlers, uses a read-write lock, and returns JSON with key and size while offering a list endpoint.
Convert sequential Go code to concurrent by spinning daily workers, fetching daily distances, and aggregating results to speed up monthly distance calculations.
Explore timeouts in Go by using a context with timeout and a buffered channel, then select to return either the algorithm's best bid or a default bid in real-time bidding.
Learn how to update multiple servers concurrently using sync.WaitGroup and wait for all updates to finish. Explore sync.Once to compute and cache a message signature only once, demonstrating idempotence.
Tackle cpu-intensive tasks by using a fixed pool of workers and a channel to dispatch vectors, compute medians, and gracefully shut down with a wait group.
Track uploaded data on your web server with the sync/atomic package. Update the total size safely using uint64 and atomic.AddUint64, without locking, and expose metrics with the xp package.
Compute total download size in Go by calculating per-file sizes from HTTP content lengths in parallel, generate year-2020 URLs, and print the total in gigabytes (about 2.27 GB).
Use an error group to run concurrent download tasks, log the download size, increment the size atomically, then wait for all jobs and convert from n64 to int.
Practice and refine programming recipes into better software as you gain experience, tailor them to your needs, and experiment to discover what works best.
Welcome to this two part course on learning Go, the programming language from Google. In this 2 part course we'll go over the fundamentals of Go and then get into Go Recipes.
We'll start things off with the fundamentals of Go. We'll cover most of the language and learn many of the concepts that underlie this programming language.
In course two, we get into more advance topics. You'll be introduced to Golang Recipes. Which shows examples of how the Go programming language can be used
We'll walk you through common Go projects with "recipes," or step-by-step instructions. We'll go over some basics, such as Go slices, maps, error handling, and panic recovery.
We'll then get into how to measure, format, parse, and convert time in Go. We'll go over ways you can work with text in Go. Then demonstrate using structs, methods, and interfaces to improve your code.
We'll discuss working with JSON and HTTP, then concludes by describing the benefits of bringing concurrent instructions to your apps.
Go – also known as Golang – is an open source programming language developed by Google in 2007. Go makes it easy to build simple, reliable, and efficient software.
Go is a programming language with modern features, clean syntax and a robust well-documented common library, making it an ideal programming language to learn. Go can be used for anything, meaning developers who learn Go can use it wherever they want.
Quite a few large companies are starting to make the switch over to Go and there are many that already use it for parts of their backend software. Some companies that use Go are: Facebook, Google, Github, 99designs and many more.
This is a great course to jumpstart your learning journey with Go, whether you want to learn it for personal or professional reasons. This course touches on all of the basics so that you will have good understanding of the Go programming language.