
Explore Go programming by example from installation to advanced topics, mastering syntax, data types, control flow, collections, functions, pointers, concurrency, and testing, culminating in a final mortgage application project.
Explore Go programming fundamentals through examples of an executable file, package main, and main function; print values with fmt, explore zero values, formatting verbs, and a recursive factorial.
Go is an open source, statically typed compiled language designed for simplicity and fast builds. It enables concurrency with goroutines and channels, and uses garbage collection for memory safety.
Learn to install the Go compiler and a suitable IDE, set up environment variables (go_home, go_path, and PATH), and configure Visual Studio Code with the Go extension for Go programming.
Explore section 2 language fundamentals, including writing the first Go program, program types, keywords, primitive data types, lexical elements, operators, and variables; review Unicode UTF-8, printing verbs, and scope.
Write your first Go program in Visual Studio Code, using package main and fmt to print hello world. Run with go run or go build, and note executables versus libraries.
Explore Go's basic data types, including unsigned integers, rune, floats, complex numbers, bools, and strings; learn camel case naming, declarations vs assignments, and zero values.
Explore Go's variable declarations—explicit var, short form, and default zero values—plus multi-variable assignments and value swaps. Learn constants, literals, tokens, and basic operators alongside printf-style verbs for practical Go programming.
Learn about Go variables: default value (zero value), short declarations, and unsigned types (uint8, uint16, uint) with explicit conversions, overflow, and basic printing in a main package example.
Explore new variable types in Go, including an unsigned int 8 and the default float64, learn printing with %f, and compare integer versus floating point division and simple increment operations.
Explore literals, variables, and constants in Go, including declaring constants with konst, comparing literals, and using iota and left shift to illustrate static typing and default values.
Review Go verbs to display numbers in decimal, binary, octal, and hexadecimal using %d, %o, %x, %X, and %b, and explore ASCII representations.
Explore more Go verbs and types, define a new string-based type, and print variables using fmt verbs like %T %v %d %f %e %t on the command line.
Learn short declaration in Go for two variables with inferred string types, then print them with spaces to show the results and implicit vs explicit typing.
Explore Go string handling, including the length function, zero-based indexing, and retrieving the fifth character with ASCII representations. Practice substring operations, plus operator concatenation, and the immutability implications.
Learn Go formatting verbs for binary values, printing 2 and -2 in widths, observe alignment and leading zeros with the zero flag, and compare binary representations of 3 and 10.
Explore boolean variables and the logical operators or, and, and not in Go, run code in a command line to see true and false results.
Explains go's single character escapes after a backslash (tab, newline, carriage return), shows how to print a backslash or quotes, and uses tab alignment to format columns.
Explore Go equality and not-equality operators, including comparing a string to a literal, and learn about short variable declaration, avoiding redeclaration, and printing multiple variables.
Explore bitwise operators in Go, formatting unsigned integers in octal and hexadecimal with flags, and explain why negating unsigned values requires signed casting.
Explore Go literals across decimal, octal, and hexadecimal forms, using leading zero for octal and 0x for hex, while noting that binary literals are not supported in Go.
Explore the minimum and maximum values of Go basic types, including int8 to int64 and uint8 to uint64, using math constants, imports, and correct formatting, plus float32 and float64 limits.
Explore NaN and infinity in Go programming by examining float64 behavior, division by zero, and the math NaN function, showing that NaN does not equal itself.
Explore how Go prints unicode characters using code points, ASCII codes, and representations, including a Chinese character and a backslash, with formatting verbs like %d, %c, and %q.
Explore escape characters and Unicode in Go, printing Korean letters and quotes on the console. Use backslash escaping and backticks for raw strings and regular expressions.
Explore unicode utf-8 in Go by printing a variable in binary, octal, decimal, hexadecimal, and string forms, using byte and ascii concepts to show 1 to 4 byte characters.
This session reviews UTF-8 encoding in Go, showing how runes relate to bytes by iterating a five-character Japanese string with for range, revealing 15 bytes, and noting four-byte Chinese characters.
Explore utf-8 encoding in go by examining a four-byte Chinese character, iterating bytes, and printing them in decimal, octal, and hex, plus using escape sequences to reconstruct the character.
Understand utf8 in Go by comparing character count to byte count, using the unicode/utf8 library to count runes and bytes and explain multi-byte characters.
Review go's utf8 handling, focusing on rune as an int32 alias and its four-byte representation. Demonstrate converting a utf8 string to a rune slice, printing hex values.
Explore utf8 part 6 by building a rune slice from a string with a for range loop and append, then use explicit conversion and print the runes to illustrate slices.
Explore variable scope in go by tracing local and global scopes, block lifetimes on stacks and the heap, and how file-level and package-level variables differ in visibility.
Practice Go basics with three exercises: average of three integers, Fahrenheit to Celsius conversion, and circle area using the short form declaration, constants, and radius.
Display a three-row table in Go by initializing a counter, printing a tab header, and using format specifiers; compare print and printf while evaluating expressions with operator precedence.
Calculate the day of the week after 85 days from Sunday using modulo 7 in Go, and explore obtaining Unix time in milliseconds with time.Now and UnixNano.
Explore Go constant declarations with iota to generate incrementing values, predict outputs for booleans such as false and true, and compute 10, 20, and 30 using 10*iota.
Explore Go string handling by comparing rune counts and byte length with the length function, then build a rune slice from two strings with a for loop and print results.
Explore variable scope in Go by tracing global variable access and block-scoped variables across main and a function, predicting outputs as blocks and functions modify values.
Explore Go control structures by reviewing if statements, for loops including range and nested loops with break and continue, and switch statements covering value, type switches, default, and follow through.
Explore if, else, and else if constructs in Go with practical examples, including boolean conditions, nested ifs, and season-based prints.
Explore the Go for loop statement and its three forms—single condition, initialization with post, and for range loops—applied to arrays and infinite loops, with practical examples.
Explore switch statements in Go, including expression switches and type switches, with examples that illustrate default behavior, optional breaks, and fall-through.
Explore Go switch statements with string cases, break semantics, and a type switch on an interface to reveal underlying types like int, float64, bool, string, and function.
In go programming by example, exercise #1 builds a bmi calculator that reads weight in pounds and height in inches, converts to kilograms and meters, computes bmi, and outputs status.
Write a Go program that prompts for a year and checks leap year status. Apply the rule: divisible by 4, not by 100, unless divisible by 400.
Build a Go program that prompts for a two-digit number between 10 and 20, validates input, generates a random number, and awards 1000 or 500 by digit sums or equality.
Write a Go program to determine the Chinese zodiac sign for a year using a 12-year cycle and modulo 12, mapping remainders to animals like rat, tiger, dog.
Spin a cursor in Go by cycling the four characters backslash, vertical bar, slash, and hyphen, with adjustable delay from the time package, clearing with backspace, and stopping with control-C.
Learn to write a Go program that randomly selects a card from a 52-card deck using rank and suit indices and switch mappings.
Write a Go program that generates a random number between 1 and 10 and gives five chances to guess, with higher or lower hints and an easily adjustable range.
Design a Go program that prints a dynamic multiplication table, adapting to any size. Use constants for rows and columns, print fixed spacing, and dynamically align headers and results.
The exercise reads a word from the console and checks whether it is a palindrome by comparing end characters with two indices.
Explore arrays and slices in Go, covering declarations, initialization, multi-dimensional arrays, slice creation, length and capacity, the append and spread operator, and core slice operations.
Explore Go arrays and slices: static, homogeneous arrays with fixed length and zero-based indexing; use ... to create dynamic slices, while maps remain dynamic and future sections cover structs.
Explore arrays in go by comparing array values to regular integers, observing zero values, using len to measure length, and iterating with range and for loops.
Review advanced array usage in Go, including float 32 arrays, various initialization styles, and range-based looping. Demonstrate comparison of arrays, multi-dimensional arrays, and the distinction between array and slice types.
Explore how Go slices describe a contiguous segment of an underlying array with a length and capacity, illustrated by slicing days of the week.
Explore Go slices and arrays through practical examples, including creating arrays and slices, slicing strings, appending with ellipses, and understanding capacity and underlying arrays.
Apply advanced slice techniques in Go: create slices with make, inspect length and capacity, copy and append elements, and flatten a slice of slices into a single slice.
Explore slices and reference types in Go, including pointers, nil, and the relationship to the underlying array, with length, capacity, copy, and append examples.
Explore comprehensive slice operations in Go, including appending, copying, and slicing to merge and rearrange data. The examples demonstrate practical techniques for manipulating int slices in Go.
Practice building a random card picker in Go using arrays for rank and suit, replacing switch statements, and generating cards like Jack of Diamonds from a 52-card deck.
Implement a Go program that sorts integers with bubble sort, using a flag to toggle ascending or descending order, and follow the nested-loop logic to bubble the largest values.
Learn to implement selection sort in Go by repeatedly finding the smallest integer and swapping it into place, using nested loops and for loops.
Implement a binary search to locate an integer in a sorted list, using start, end, and mid to halve the search space until the key is found or not present.
Learn hash tables and maps in Go by using the make function to create maps, add and remove elements, and search maps, including practical examples with Unicode code points.
Explore maps in Go by examining keys and values, their types, and the one-to-one relationship; learn map syntax, initialization forms, nil, and the hash table underpinning.
Explore hash tables by turning three-character strings into unique keys using ascii codes and a weighted sum. See a non-optimized example and a prompt to generalize beyond three characters.
Learn hashtables in Go by implementing a string hash function, generating hash keys, and processing a slice to compute ascii-based values, with notes on overflow and maps fundamentals.
Create and update maps in Go with make, compare to non-make forms, and learn that nil maps panic on assignment but are safe for len, range, and delete.
Explore how maps in Go manage key-value pairs, including insertion, lookup, deletion, and overwriting, while noting that keys are unique and the map order can vary between runs.
Learn to sort map keys in Go by example, perform map lookups with ok checks, and print salaries in sorted key order.
Explore practical go maps and slices by removing duplicate words from a slice using a string-to-bool map, and by mapping languages to extensions and time zones with lookups.
Count distinct unicode code points by converting a string to a rune slice, build a map[rune]int, and compare string length with rune count to reveal multibyte characters.
Explore Go functions by examining parameters, arguments, slices, return types, and stacks. Learn about variadic functions and arguments, and see a map of maps.
Explore how functions in Golang map inputs to outputs, declare with func, define parameters and return values, and call simple functions from a main program.
Explore Go function parameters, including adding, swapping with multiple returns and named returns, and demonstrate call by reference for slices and by value in averaging.
Explore functions and stacks in Go by examining local versus global variables, how values are passed by copy, and how scope and lifetimes affect access across f1, f2, and f3.
Explore variadic functions in Go by summing numbers, using ellipses to accept a variable number of int parameters, and comparing variadic calls with slice spreads.
Go programming by example demonstrates a function that filters blank strings from a string slice, using both regular and variadic forms and explaining underlying data sharing.
Explore implementing a Go stack with a slice and variadic push, using push, pop, and top operations on a sequence of numbers to demonstrate multi-element adds and top retrieval.
Explore how maps store key-value pairs and how a map of maps uses two layers to hold employees' names, keyed by initials.
Learn to implement a map of maps in Go by adding players with unique first names, using a has player function to check name pairs, and printing the two-layer structure.
Go programming by example: exercise 5 rewrites the spinning cursor program with functions, runs for a fixed execution time, and displays the elapsed time, using a 100 ms delay.
Explore pointers, pointer aliasing, and memory allocation, mastering reference versus value semantics and using pointers to primitive and composite types, including a slice of a slice and functions.
Go pointers theory: declare pointers to integers with var or new, use address of and content of a pointer, and learn aliasing and pointer to pointer.
Explains go pointers basics by declaring x, creating p as its address, and dereferencing p to change x; explores pointer to y and pointer to pointer, plus varying addresses.
Explore pointers and slices in Go, inspect addresses, dereference pointers to access slice elements, and understand sub-slices and memory layout.
Explore pointers and slice of slices in Go, using pointers to arrays and slices, then dereference to modify values and append with the spread operator.
Explore functions and pointers in Go, including returning pointers, stack versus heap allocation of local variables, and the impact of garbage collection.
Explore pointer versus non-pointer types in Go, demonstrating call by value and call by reference, showing how copying affects function changes and how passing a pointer mutates the original.
Explore pointers and reference types in Go through an assignment that increments a value via a function and prints values and addresses, confirming slice and array memory sharing.
Explore anonymous functions and higher-order returns in Go, examine closures and function callbacks, and review recursion, panic, and recover with practical examples.
Learn about function literals in Go: inline anonymous functions, assigning them to variables, their types as functions accepting a string, and the tradeoffs of inlining versus named definitions.
Explore Go function literals and closures, showing how an inline function captures outer variables and returns an int, and how a function can return another function (functions as return types).
Explains closures in Go as functions declared inside another function that capture and preserve the surrounding state. Demonstrates add-by and multiply-by closures using evolving internal state.
Define inline square and cube functions and pass them to a calc function to compute results, demonstrating callbacks, anonymous functions, and function types in Go.
Implement a variadic callback in Go that accepts several integers and returns an integer. Demonstrate passing a slice with the spread operator to a callback and using add or multiply.
Explore recursion in Go programming via a factorial function that calls itself, builds a call stack, and yields the correct result.
Explore recursion in Go by implementing a Fibonacci function that generates 15 numbers and computes any term from the sum of two preceding terms, with base cases 0 and 1.
Explore how defer preserves resource cleanup by deferring close operations to the end of a function, illustrating lifo execution with file and connection closes and timed delays.
Learn how a square function in Go uses a defer with an immediately invoked anonymous function to hijack the return value and illustrate result control.
Explains panic and recover in go, shows how runtime errors trigger panics, how defer unwinds the stack, and how recover regains control after a panic.
Explore panic and recover in Go by handling a runtime error from an uninitialized map. Use a deferred recover to print a clean error message and compare with uncaptured panics.
Explore custom types and embedded structs, learn to access and modify fields with anonymous fields, apply method receivers with pointers, and compare Go to object oriented languages.
Explore how struct serves as an aggregate data type in Go to define a type with named fields like name and age, and learn to declare and access such values.
Demonstrate Go structs by defining a struct with name, border, and age, and initializing with positional and named literals. Access fields, observe zero values, and create new instances.
explains anonymous structs, shows positional and named initialization, and demonstrates that a pointer to a struct shares the same memory and can update fields.
Go programming by example explores comparing structs by value and by reference using a book type with name and author, illustrating pointers, memory addresses, and how modifications affect originals.
Create a player struct with name and age, explore pointers to that struct, dereference with * to read and modify fields, and print pointer versus value forms across examples.
Demonstrates anonymous fields in Go structs, where fields are named by type rather than name, showing positional vs. named initialization and the compiler error for duplicate anonymous types.
Master embedded structs in Go by factoring common fields like country and hair color into a general information struct, then embedding it in a player struct and initializing examples.
Learn to use embedded anonymous structs in Go by creating an anonymous field of a structure and accessing its fields—name, age, sport, country, hair color—in a Wayne Gretzky example.
Explore multiple embedded structs in Go by building nested info, person, and student types, leveraging anonymous fields, understanding inheritance-like behavior, avoiding duplicate names, and using print formats to reveal values.
Explore how Go has no classes, uses structs and receivers to define methods, and attach functions as methods to struct types.
Export structs and fields in Go, attach methods with receivers, and organize code into packages. Build a library with a Player type and import it into an executable.
Explore method overloading and overriding, and see how Go forbids overloading and uses the receiver as part of a method's signature.
Demonstrates structs in Go with artist and singer types, using pointer receivers and methods to access name and age, and shows how methods with the same name behave across types.
Explore interfaces in Go, covering fundamental concepts, the MT interface, and type assertions. Practice conversion typecasting, narrowing and widening, and using sort and strings functions like reverse ints in code.
Explore how interfaces define abstract methods and enable polymorphism across objects. See Go's interface design with type, and shapes like rectangle and square implementing area.
Explore how Go interfaces enable polymorphism by implementing the Shape interface with rectangle and square types, computing area and perimeter, and aggregating areas with variadic shape parameters.
Discover how Go's empty interface can hold values of any type, enabling heterogeneous collections like athletes and players, and learn tradeoffs with typed variables, generics, and handling unknown types.
Explain conversion and typecasting in Go, covering widening and narrowing between integers and floats, and converting between strings and numeric or boolean values using the strconv package.
Explore interface type assertion in Go: detect and convert an interface's dynamic type (string, int, float), use ok checks, and handle conversions and edge cases with examples.
Review Go's sort package by showing how to sort integer and string slices with its functions, including import examples and clarifications on package vs function naming and interfaces.
Learn how go's sort package relies on sort.Interface with Len, Less, and Swap to sort any type, including int, string, and float64 slices, via sort.Sort and sort.Reverse.
learn how to make a custom type satisfy an interface in go by implementing Len, Less, and Swap, using a Person type and a string slice to sort and reverse.
Explore how Go interfaces work by implementing methods on a player slice, customizing string formatting, and sorting by country to reveal data like Roger Federer and Lionel Messi.
Go that is called a ‘C for the 21st century’ was designed in 2007 to address some of the industry problems.
Today, many well-known companies like Google, Adobe, Facebook, IBM, and many more use Go.
They use Go, because of its simple approach to implement complex concepts.
This practical course will enable you to build simple, reliable, and efficient software, delivering basic to advanced concepts using Go.
The course is over 23 hours, including 160+ lectures, over 163 code examples, chapter assignments and a final assignment.
Emphasis has been placed on reviewing code examples, diagrams and white boarding.
The course gradually moves from basic to advanced topics and eventually ends with a final assignment.
In 16 sections, it covers topics such as language fundamentals, control structures, arrays, slices, maps, functions, callbacks, closures, pointers, structs, interfaces, concurrency & parallelism, goroutines, channels, packages, documentation, error handling, unit testing, json, files, reflections, MySQL, and may more.