A Learning Path is a specially tailored course that brings together two or more different topics that lead you to achieve an end goal. Much thought goes into the selection of the assets for a Learning Path, and this is done through a complete understanding of the requirements to achieve a goal.
Go is a multi-paradigm programming language that has built-in facilities to simplify the development of modern applications. You can create concurrent applications and it is particularly useful in developing cloud-native applications as it’s convenient, occupies a low footprint, and deploys fast.
A Learning Path is a specially tailored course that brings together two or more different topics that lead you to achieve an end goal. Much thought goes into the selection of the assets for a Learning Path, and this is done through a complete understanding of the requirements to achieve a goal.
Go is a multi-paradigm programming language that has built-in facilities to simplify the development of modern applications. You can create concurrent applications and it is particularly useful in developing cloud-native applications as it’s convenient, occupies a low footprint, and deploys fast.
This Learning Path is architected to teach you interesting tools, frameworks, and techniques that you can use to leverage the benefits of working with Go to develop your applications. You will begin to get familiar with the tools to build web applications, microservices, command-line applications, and much more. Once you are comfortable with developing your apps, you will then learn some amazing tips, tricks & techniques to improve the code quality of your projects. Moving further, you will learn to troubleshoot your Go application to prevent crashes in production by remembering just a few simple techniques and effortlessly surmount the hurdles and become more productive quickly, writing fast, and stable code.
By the end, you will have gained a solid foundation of Go as well as the skills to make your applications more robust and resilient.
Author Bios
Tarik Guney has been working as a software engineer for more than 10 years in the industry, in various domains including finance, education, and public safety. He is currently working as a principal software engineer for Motorola Solutions. His passion for programming and his years of experience in the industry always lead him to explore new technologies, using them in real-world scenarios, and helping others. Besides his videos about Go Programming, he has recorded hours of videos about various other IT topics.
Theofanis Despoudis is a Senior Level Software Engineer at Teckro. He is an accomplished and accountable Software Developer with a consistent record of achievements in the successful end-to-end delivery of leading-edge projects and products. He has an interest in Linux as an Operating System and also got practical working experience with it. (He has worked with Debian, Ubuntu, Fedora, and a little bit of Red Hat).
Martin Helmich studied computer science at the University of Applied Sciences in Osnabrück and lives in Rahden, Germany. He works as a software architect, specializing in building distributed applications using web technologies and Microservice Architectures. Besides programming in Go, PHP, Python, and Node.js, he also builds infrastructures using configuration management tools such as SaltStack and container technologies such as Docker and Kubernetes.
Shawn Milochik has been programming for over 20 years and has used Go since 2014. In addition to coding, and mentoring coders, he enjoys teaching, studying music theory, and podcasting. He's currently working as a Cloud Engineering Manager at Teltech Systems, Inc.
This video will give you an overview about the course.
In this video, we will learn Installing the Go binaries to the local computer.
• Download the Go binaries from the internet
• Use the installer, installing the Go binaries
• Setup the GOPATH environment variable and workspace folders
In this video, we will take a quick look at how Go looks like and where to learn more about the basic syntax.
• Check out the Go tour website
• Check the basic syntactical differences of Go compared to other programming languages
In this video, we will look at how to trim spaces from beginning to end.
• Use the built-in functions, we are removing the spaces
In this video, we will look at how to extract substrings from string values.
• Define the string from which we are going to extract a piece
• Use the slices syntax, we are extracting a piece from the given string value
In this video, we will learn to replace parts of a string.
• Use strings.Replace() built-in function, to replace a given string with something else
In this video, we will look at escaping characters in strings.
• Use back slash character to escape special characters in string values
In this video, we will learn how to capitalize string values.
• Use strings.Title(), to capitalize the first letters of words
• Use strings.ToUpper(),to capitalize all the letters of a given word in a string value
In this video, we will convert bool to string.
• Use strconv.FormatBool() built-in function,to convert Boolean to string value
In this video, we will convert integer and float values to string.
• Use strconv.FormatInt(), to convert the integer values to string
• Use strconv.FormatFloat(),to convert float to string
In this video, We will parse string values to bool.
• Use strconv.ParseBool()
In this video, we will parse string values to integer and float.
• Use strconv.ParseInt()
• Use strconv.ParseFloat()
In this video, we will convert a byte array to string.
• Use string() built-in conversion
In this video, we will be finding today’s date and time.
• Quick demonstration to time package
• Use time.Now() function as defined under time package
In this video, we will be adding or subtracting from date.
• Get the current date and time with time.Now()
• Use the .AddDate() function over the values of type time
• Pass negative parameters to AddDate() function to subtract
In this video, we will find the difference between two date and time values.
• Define two time types using time.Date() function
• Use .Sub() function of the first to subtract the second
In this video, we will be parsing the date values in type of string to actual date and time types in Go.
• Define a simple date in string format and defining the layout to use to instruct Go for how to parse the given string
• Use time.Parse() function to parse
In this video, we will be extracting unique elements from a given list.
• Define a new function called unique()
• Create a new list to store the unique elements
• Check if the iterated item already exists in the list, not adding it to the unique items list
In this video, we will be finding an element from an array.
• Define a new list with elements
• Use for loop and range operator, iterating each item and checking if it is what we want
Revert the order of an array.
• Define an new list with elements
• Use sort package and the methods defined under it such as .Sort(), and .Reverse()
In this video, we will be iterating an array.
• Use for loop
• Range operator constructs
In this video, we will be adding all of the items of map into an array as key-value pairs.
• Create a new struct type which will keep the key/value pairs as fields
• Iterate the map to get each key and its corresponding value
• Add each key-value pair to the list
In this video, we will be merging two arrays into one.
• Create two simple maps with elements
• Use append() built-in functions and passing both of the arrays
In this video, we will be merging two maps into one.
• Create two simple maps populated with elements
• Iterate one of the maps and inserting its keys and values to the other map
In this video, we will be checking if a key exists in a map.
• Use the special syntax to check the existence of a key in a given map
In this video, we will be creating custom error types for collecting more information about a custom error handling situation.
• Create a new struct
• Implement the Error() method to satisfy the Error interface
In this video, we will be handling errors in Go.
• Show how to handle errors returned from function calls
In this video, we will be logging various state of the application including errors and information.
• Use the built-in mechanism
• Save the log information to a file
In this video, we will be recovering from a panic.
• Panic in the application
• Use the delay and recover keywords, gracefully recovering from the panic state
In this video, we will be checking whether a file exists in a given location or not.
• Create a temporary file
• Use os.Stat() function, checking if the file exists
In this video, we will be reading the entire content of a given file into memory.
• Create the file to read
• Use ioutil.ReadFile() function, reading its content into memory
In this video, we will be writing an in memory string value into a new file.
• Use ioutil.WriteFile() function, writing the content into a file
In this video, we will be creating a file that is located in a temporary location.
• Use ioutil.TempFile(), creating a new temporary file
• Write some text content into the created temporary file
In this video, we will be counting how many lines in a given file and displaying it on the console.
• Use os.Open() function, loading the file into the memory
• Use bufio.NewScanner(), counting how many lines in the file
In this video, we will be reading just a desired line from a given file.
• Use os.Open() function, loading the file into the memory
• Use bufio.NewScanner() and .Scan() function, we read the line into a new variable
In this video, we will be loading two text files into memory and comparing their content with each other.
• Load both of the files into memory
• Use bytes.Equal() function to compare the two files contents
In this video, we will be deleting a given file from its physical location.
• Use os.Remove() function and provide it with the location of the file, deleting the file
In this video, we will be copying and later moving file from one location to another.
• Create a file to copy and move
• Copy the file by creating a new copy of it in the desired location
• Copy the file by creating a new copy of it in the desired location and removing the original file from its physical location
In this video, we will be renaming a given file.
• Use os.Rename() function and provide it with the physical file location and the new file name to rename it to
In this video, we will be deleting a physical folder and its content along with it.
• Use os.Remove() function to remove a folder without sub folder and files in it
• Use os.RemoveAll() to remove both the folder and all of its files and sub folders
In this video, we will be reading all of the file names from a given directory into the memory.
• Use the ioutil.ReadDir() function, reading all the files names into memory variable
In this video, we will be running multiple Go functions in a concurrent manner.
• Use Go keyword to run functions as Go routines, which are what runs as a concurrent function in Go programming language
In this video, we will be passing data between multiple concurrent functions while they are being executed.
• Use the channel construct to synchronize
• Pass data between concurrent functions
In this video, we will be waiting all of the running concurrent functions to finish in the main Go routine.
• Use sync.WaitGroup(), waiting for all the Go routines to finish
In this video, we will be getting the results of multiple concurrent functions as they are running.
• Use the select keyword to get the returned values through channels
In this video, we will catch the OS-level signals coming from other processes.
• Use signal.Notify() function to get the signals passed to your Go application
• Output them to the console
In this video, we will be running another process from Go applications.
• Use exec.Command() function, running ls command that is available on Unix and Linux based operating systems
In this video, we will be reading the arguments passed to the Go application and process a different action based on the passed arguments.
• Use the os.Args slice to read the passed arguments from command line
• Run writeHelloWorld() function for an argument called “a”
In this video, we will be downloading a given URL content from internet.
• Use http.Get() to get the content of the URL
• Access the Body property of the returned object, writing the content to the console
In this video, we will be downloading an image file from a given URL.
• Use the http.Get() function, getting the file
• Create a new file in the file system
• Write the content of the downloaded image into the new file created in the file system
In this video, we will be creating a simple web server that handles HTTP request and returns response.
• Use http.HandleFunc() and http.ListenAndServe() functions
• Create a simple web server that handles requests on port 5050
In this video, we will be creating a simple file server that serves static files such as images, JavaScript files, CSS files, and so on.
Use http.FileServer() function in http.Handle() function to serve static files
Use http.ListenAndServe() to listen to the requests coming through 5050 port on the localhost
Serve the static content accordingly
In this video, we will be reading data records from SQLite database.
Use go get command, downloading third-party SQLite database package first
Use the database/SQL built-in package to interact with database
Read data from the database using db.Query() function
In this video, we will be inserting data rows into SQLite database.
Use the database/ SQL built-in package to interact with database
Use db.Prepare() and .Exec() function to insert the desired data
In this video, we will be updating an existing record in the database.
Use the db.Prepare() and .Exec() function to update an existing record with desired values
In this video, we will be deleting an existing record in the given database table.
Use the db.Prepare() and .Exec() function to delete an existing record
In order to make the most of the contents of this course, you are expected to have working knowledge of Go and understand the basics.
Have latest Go installed
Have a programmers editor installed
Have #GOPATH, $GOROOT configured
Understand the important characteristics of Go as a language and the tradeoff of its design. Learn about the most common use cases in Go and how fast can it be.
Understand that Go is fast enough to be productive and efficient
Understand that Go is simple but opinionated
Understand that Go has a lot of real world use cases
Mastering Go first means mastering how input and output interactions work in the language. In this section we show how important is to write idiomatic Go when handling input and output operations so that the abstractions can tie together with the rest of the Go ecosystem.
Understand log, fmt and interactions with the operating system
Understand io, buffered io, and scanners
Understand io.reader and io.writer interfaces
Error handling is crucial in writing robust and enterprise ready solutions. We need to understand and embrace Go error handling in a way that it will help us catch and handle all errors that may occur in our solutions.
Understand what are errors and error handling in Go
Learn how to print the stack trace
Understand the caveats of panics and how to recover
Understanding how imports and special packages work is an important factor when working with Go. Layering down a naming plan for source code will help scale out the application so that multiple teams can work together with minimal frictions.
Understand imports, exporting identifiers and why package names matter
Understand special packages and how to organize them in a logical manner
Understand why Makefiles help with program automation
A process monitor is a command line tool that queries and shows relevant information about Operating System processes. On top of that it offers the ability to filter a process by id or stop a process by id. Your task for today is to implement this tool using the information we showed today.
Write initial code to poll the OS for process information
Use the poll function to query and print specific process information
Add additional options to filter the results by process id
We review yesterday’s task, which was a process monitor, and propose a sample implementation.
Write code to invoice a process to retrieve the process information
Use a go-routine to poll every 10 seconds
Print results in screen
In this video, we talk about the kinds of types in Go and understand how the type system works.
Understand basic and composite types
Understand underlying types
Understand type casts
In this video, we talk about the string and rune types in Go and how they are represented in memory.
Understand the String representation
Understand string operations
Understand rune representation and conversions
In this video, we talk about functions and closures in Go and how we compose functions together.
Understand functions as types
Understand function calls
Understand function compositions
In this video we talk about pointers and pointer operations in Go and how to use structs.
Understand what pointers are and how we use them
Understand structs, type methods and comparisons
Understand anonymous structs
In this video, we talk about interfaces and composition and how to use type modeling in Go.
Understand interfaces and polymorphic rules
Understand type embedding
Understand type compositions
In this video, we talk about the common container types in Go such as arrays slices and maps and what are their operations.
Understand arrays
Understand slices
Understand maps
In this video, we talk about channels and how are they used in Go as a communication tool between coroutines.
Understand closing of channels
Understand build-in methods of channels
Understand select on channels
In this video, we talk about the reflection capabilities of the language and how reflection helps in several cases.
Understand reflection Type
Understand common reflection methods
Understand reflection value
In this video, we talk about the build-in concurrency facilities in Go and how can they be used at runtime.
Understand go-routine states
Understand closures in go-routine
Understand go-routine synchronization pitfalls
A markdown processor is a tool that parses a text written in Markdown format and outputs the equivalent in HTML. Your task for today is to implement this tool using the information we showed today.
Implement parsing of text into a Tree
Implement rendering of a Tree into HTML
Implement at least 3 inline rules
We review the yesterday’s task which was the markdown processor and propose a sample implementation using interfaces and type composition.
Define interface types to map to each markdown element types
Provide a Parse method to create an intermediate representation tree of the markdown text
Provide a Render or WriteTo method to parse the intermediate tree into an output format such as HTML and output to the console
Writing reusable library code is important to know how to do it. We need to understand how libraries are used and how to provide the best APIs for them without breaking compatibility.
Understand what are Libraries
Understand how libraries are used
Understand how we structure library code
Algorithms and Data Structures and important to implement as libraries as the expose useful functionality to clients consuming them. They almost become indispensable in bigger programs that solve complex engineering problems. In this section we are going to implement a Set data structure.
Define the abstract representation of the Set data structure
Provide an implementation detail of the Set operations
Expose a simple and convenient API to clients
GitHub is a cloud service that handles git repositories. They have a vast REST API that covers a lot of their operations. In this section, we are going to implement a REST API client library that can be used to consume operations using the exposed API.
Implement the basic http client tool
Implement methods to request and handle API payloads
Implement a method to consume an endpoint
A blockchain is a data structure as a growing list of records called blocks that are linked using cryptographic methods. A blockchain SDK is a library tool that helps with creating and handling those records in a secure way. In this section we are going to implement this SDK and expose the most important methods and interfaces.
Define basic abstractions like Block, Blockchain and transaction
Implement method to create Blocks, Blockchains and Transactions
Verify with a small example that the block invariants are correct when using the SDK
A logging tool is a library element that helps with recording useful information about a program at runtime. In this task you are to implement a simple logging library that offers structured logging and writing to the console.
Create initial code for handling structured logging
Use locks to prevent issues with overlapping of messages
Write log output to console
We review the yesterday’s task which was the logging tool and propose a sample implementation.
Define the logging levels
Implement code to log information based on the current logging level
Implement code to change the current level and print to console
Command line applications are tools that are meant to be used from a command line. They are typically standalone and the offer a lot of functionality out of the box. In this section, we are going to show the important implementation details when working with command-line tools and what makes them less error prone.
Understand the usage of the flag package
Understand why it’s important to validate command line flags
Learn where CLI tools reside in a project
A file search tool is a CLI that helps with searching in directories for file names or patterns matching a file name or directory. In this example we are going to implement this tool and how to handle different flag parameters.
Write the required flag parameters and validate them
Write a performSearch method that will recursively search the define path for matching files or directories
Compile and test the tool in the command line
Curl is a command line tool for performing HTTP requests and it’s widely used in development. In this example we are going to implement this tool and understand the common patterns of HTTP clients.
Write the required flag parameters and validate them
Write the performRequest method to execute the request for the specified URL
Compile and test the tool in the command line
A key-value database is a program that helps with persisting dictionaries of objects or collections in the disk. They offer a lot of flexibility in terms of scalability and ease of usage. In this example we are going to implement our own version of MongoDB using .json files and test it with a simple HTTP client.
Write the library code to write json files to disk based on a key parameter
Provide methods to read, write, delete to files
Write a http server to utilize the tool in the command line using curl and test that the actions are performing as expected
Stack Overflow is a very popular site that hosts Q/A and tech-related information with a reward factor. One cool way we can automate searching for engineering questions is to using it from the command line. In this task you are asked to create this tool that will query the top answer for a particular questions using the Stack Exchange API.
Define the command line client
Implement the http client that will query the API
Parse the response and print the top answer in a readable form
We review the yesterday’s task which was a Stack Overflow search tool and propose a sample implementation using an http client
Find the correct endpoint
Write the client to performSearch
Use the information provided to request the answer and parse the result
Server side code is relatively easy to write in Go as the standard library has a plethora of tools to build configurable servers. In this video we list the most important aspects of server side software in Go.
Understand that there are multiple protocols each with its own caveats
Understand that concurrency is used more frequently
Understand that servers require more resources from the Operating system
TCP is a communication protocol that allows persistent and connection oriented messages between endpoints. In this sections we are going to see examples of a TCP client and server as well as how to handle TCP connections.
Understand how to initiate TCP requests
Understand how to initiate TCP servers
Understand how to handle TCP connections
UDP is a communication protocol that allows connectionless parties to exchange information. In this sections we are going to see examples of a UDP client and server as well as how to handle UDP connections.
Understand how to initiate UDP requests
Understand how to initiate UDP servers
Understand how to initiate UDP connections
Web frameworks are a collection of cohesive tools that aid in the development of Web applications and servers. In this video we are going to design and implement a simple yet easy to use Web frameworks and create our first application with that.
Understand how to build web application frameworks
Understand how routing works in Web Frameworks
Understand more about Web Framework contexts
A CORS anywhere server is a server that process Cross origin requests from one endpoint to another by manipulating some headers. In this task you are asked to create this server using the knowledge you gained from today’s videos.
Write initial code to handle CORS headers
Write code to proxy requests
Test the server with an example request
We review the yesterday’s task which was a CORS anywhere server and propose a sample implementation.
Create a minimal server that proxies requests
Implement the handleCorsRequest method to pass manipulate the CORS headers
Test your server with a simple example
Microservices is a Software Architecture style that breaks the functionality of monolithic applications into small, re-usable services that are individually deployable. In this video we define the most important benefits of using microservices.
Understand why we break monoliths into microservices
Understand how microservices are easier to scale
Understand the caveats of microservices
Domain Driven Design is an approach to software development that places importance on the core domain logic and knowledge. In this video we are going to structure an initial issue tracker microservice using DDD that evolves as we grow it.
Understand why domain logic is not tied to external dependencies
Understand how to structure a domain project and separation of concerns
Understand how to assemble implementation details in the main app
Databases integration plays an important part when developing micro services as the state of the application must be reasonably modeled for efficiency. In this video we see an example implementation of a repository pattern using SQL.
Understand how the database/sql package works
Understand how to perform data definition queries
Understand how to perform data manipulation queries
The first major goal when developing micro services is to manage authentication and user registration. In this video we are going to see how we can add an Auth microservice and integrate JWT tokens in our application
Understand why is important to separate User accounts from User details
Understand how JWT tokens work
Understand that micro services need to communicate with each other in a secure but flexible way.
OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.
Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.
Find this site helpful? Tell a friend about us.
We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.
Your purchases help us maintain our catalog and keep our servers humming without ads.
Thank you for supporting OpenCourser.