
Programming in Go
Learn Go Programming for Fast Applications
What you'll learn
- Install Go tools and create your first project
- Understand data types, variables and constants
- Use arithmetic, logical and comparison operations
- Write If and Switch statements
- Use loops
- Create functions and methods
- Use pointers and arrays
- Work with Struct and Map
- Work with interfaces and user input
About this course
This course teaches programming in Go from scratch. It starts with the course introduction, installing the tools and creating your first project, then comments, data types, how to check a data type, variables, naming rules and constants. Next you learn arithmetic, comparison and logical operations and how to modify variables, followed by the If statement in several parts and the Switch statement. You then move to loops and functions across several parts, then methods, pointers, arrays, Struct, Map, working with interfaces and reading user input, and you finish with building applications. The course suits anyone who wants to learn Go, whether you are new to programming or already know another language. You need no previous experience, because the course begins with installing the tools and explains every concept with an example. Each part uses short, clear examples, so you move from the simplest ideas to the harder ones without getting lost. By the end, you will be able to write Go programs that use variables, conditions, loops, functions and data structures.
Expected outcomes
- Write clean and efficient code using Go.
- Build small to medium applications using core concepts.
- Understand how to handle data and programming structures.
- Establish a foundation for mastering Go in advanced projects.
Learner reviews
Course content
1Basics
9 lectures
- Course IntroductionAn introduction to Go, Google's open-source language: it runs on Windows, Mac and Linux, is compiled, fast and simple in syntax, and is used for cloud apps, networking, e-commerce and DevOps.3:27
- Installing the ToolsCovers installing Go from go.dev, then choosing a code editor such as Visual Studio Code or an IDE such as GoLand, and adding the Go extension so the editor recognizes the code.8:44
- Creating Your First ProjectWalks through creating a first Go project: initializing the go.mod file, creating a .go file with package main, importing the fmt package, and writing the main function as the program's entry point.12:31
- CommentsExplains comments in Go: single-line comments with // and multi-line comments between /* and */, which the compiler ignores and which help explain code to yourself and others.7:49
- Data TypesExplains the basic data types in Go: integers and floating-point numbers, the character, the string, and the Boolean, and the difference between a character and a string.10:42
- Understanding Data TypesExplains how to find a value's data type in Go using Printf with the %T format specifier, showing the basic types such as boolean, integer, float64 and string.16:28
- VariablesExplains variables in Go as places that store values instead of repeating them, ways to declare them with var or :=, specifying the type, default values, and the difference between declaring inside and outside a function.22:36
- Variable Naming ConventionsExplains variable naming rules in Go, including case sensitivity between names, the preferred camelCase style, and declaring several variables of different types on one line.22:51
- ConstantsExplains constants in Go, which are variables whose values never change during the program and are declared with the const keyword, and that the compiler raises an error if you try to modify them.7:49
2Operations
4 lectures
- Mathematical OperationsExplains arithmetic operators in Go: addition, subtraction, multiplication, division and modulus, with defining variables and printing results, plus increment and decrement using ++ and --.15:50
- Comparison OperationsExplains comparison operators in Go such as greater than, less than and equal, which return a Boolean value of true or false, applied to numbers and strings.11:16
- Logical OperationsExplains the logical operators in Go, AND, OR and NOT, and how they combine or negate Boolean expressions to give true or false, in preparation for use in conditions.15:53
- Variable Modification OperationsExplains assignment operators in Go such as =, +=, -= and *=, and how they shorten updating a variable's value instead of writing out the whole arithmetic operation.10:55
3Decision Making
5 lectures
- If Conditional Statement (Part 1)Explains the if statement in Go, which runs code when a condition holds, using comparison and logical operators, and previews other forms such as if else.11:26
- If Conditional Statement (Part 2)Explains the if statement with else, showing how the program runs the if block when the condition holds and the else block when it does not, with an example comparing two values.8:54
- If Conditional Statement (Part 3)Explains else if for testing several conditions in order, if then else if then else, with an example checking a server connection's status code and printing a suitable message.8:21
- If Conditional Statement (Part 4)Explains nested if statements in Go, placing an if inside an if or else so the inner condition is tested only when the outer one holds, with examples using x and y values.6:58
- Switch Conditional StatementExplains the switch statement in Go as an alternative to if when comparing an expression against several values, using case and default, with a weekday example and a status code check.15:27
4Iterative Loops
4 lectures
- Loops (Part 1)Introduces loops in Go and explains the while-style loop using a counter, a condition and an update to repeat a print statement, and how the starting value affects the number of iterations.16:27
- Loops (Part 2)Continues loops in Go with the for loop and its three parts, customizing the update step, using continue to skip chosen values and break to stop the loop, with an example printing even numbers.10:52
- Loops (Part 3)Explains nested for loops in Go, where one for loop sits inside another, and applies them to produce a multiplication table, showing how the outer and inner counters change.6:26
- Loops (Part 4)Explains the continue and break keywords inside Go for loops, where continue skips an iteration under a condition and break stops the loop, with an example that skips printing the value 5.5:48
5Functions
8 lectures
- Functions (Part 1)Explains functions in Go: defining them with func as reusable blocks of code that perform a task, naming them in camelCase or PascalCase, and calling them by name with a print example.8:39
- Functions (Part 2)Explains Go functions that take parameters, the difference between a parameter at definition and an argument at call time, with an example function that prints a greeting using a name and age passed to it.8:46
- Functions (Part 3)Explains Go functions without parameters but with return, how a function returns one or more values, naming return values, and storing the results in variables for later use.12:00
- Functions (Part 4)Explains Go functions that take parameters and return values, the need for matching return types, and ways to use the results by printing them directly or storing them in variables.7:49
- Functions (Part 5)Explains recursive functions in Go, which call themselves and stop through a condition with return, applied to computing the factorial of a number such as 5 by multiplying it by the factorial of the previous number.9:05
- Functions (Part 6)Explains the anonymous function in Go, a function without a name assigned to a variable of function type that can be called and passed arguments, with examples of its use.6:22
- Functions (Part 7)Explains function closures in Go, a function that returns another anonymous function which keeps an outer variable, with a number generator example whose value grows on each call.9:37
- MethodsExplains methods in Go, special functions tied to a type such as a struct through a receiver, applied with a circle type and a method that computes the circle's area, called from a variable of that type.11:06
6Data Collection
6 lectures
- PointersExplains pointers in Go, how each variable is stored at a memory address, getting the address with the & operator and reading the value with *, which helps save memory.11:43
- ArraysExplains the Array in Go as a derived type, how to define it, read its elements by index and loop over it with for, and what happens when the number of elements differs from its size.24:11
- StructExplains the struct in Go as a collection of members of different types, how it differs from an array, and how to define a new type like person, create variables from it, then modify and print its fields.17:56
- MapExplains the Map in Go for storing data as key and value pairs, how to define one by setting key and value types, adding and changing items by key, and how it differs from an array that uses an index.24:37
- Working with InterfacesExplains the interface in Go as a set of method signatures, how it differs from a struct, with a shapes example such as circle and rectangle where each computes its own area in its own way.18:55
- Data InputExplains reading user input from the terminal in Go by showing a prompt and using a Scanner to read the entered text, then converting the input to a number and handling the returned error.18:38
7Attachments
1 attachments
- App Downloading
Instructor

Eng. Amr Abdel Fattah



