If you are working in the Cloud or DevOps space, then this course is for you. Golang has been gaining massively in popularity in the recent years. Forget the small shell scripts you'd write to glue things together. You can create real programs with a great programming language created by Google. It compiles fast, it runs fast, it has static typing, and it has been used to write popular applications like Docker and Kubernetes. It's the best choice to write your next applications in.
If you are working in the Cloud or DevOps space, then this course is for you. Golang has been gaining massively in popularity in the recent years. Forget the small shell scripts you'd write to glue things together. You can create real programs with a great programming language created by Google. It compiles fast, it runs fast, it has static typing, and it has been used to write popular applications like Docker and Kubernetes. It's the best choice to write your next applications in.
I'll show you how to write applications to integrate with any third party that has a REST API. While I'm explaining you our first program that will make API calls, you'll learn step by step how to use Go. Next, I'll show you how to integrate with the AWS API to launch a new instance using Go. Not launching instances anymore because you're workload is completely containerized? The next section shows you how to use the Kubernetes API using the Kubernetes go-client.
Once you went on to integrate with those technologies, you should be able to write your own Go code to integrate with the APIs that you're using within your organization. Happy learning.
I also answer all questions in the Q&A section and you can reach out to me by direct message. I run weekly office hours if you want to talk to me.
Note: this course has Closed Captions available in English (not auto-generated)
Update 04/2024:
* Added how to write a Kubernetes Operator Controller in Go
Introduction to the course
This lectures contains links to useful information and my source files used in the course
Installation instructions to setup Go in Visual Studio Code
Our first helloworld golang application
Introduction to golang executables and print a message on the terminal
Introduction to using and capturing command arguments in Golang
Demo explaining conditionals
A 1-pager with common lines of code to learn the Go syntax
A HTTP Get demo showing how to do http requests
After doing an http request, golang can parse the JSON objects in a struct
io.Reader interface explained by creating our own custom reader
JSON Parsing with multiple endpoints
A rewrite of our http-get program with functions
How to do custom error handling in Golang with our http Get code that generates an http response
In this lecture I refactor our program to use the "flag" package
An introduction in how we're going to access protected endpoints
When an external API needs authentication, you need to specify a way of authentication. In this lecture we experiment with passing a JWT in an authentication header. We override the http Transport function for that.
In this demo we're putting our code in a separate package
Now that we have Get API calls to a server, we want to test this code. We're going to write a MockClient to test the go code that we have written
We implemented a custom RoundTrip for our http requests to inject a JWT token. Let's now write a test for this piece of code
An explanation of pointers in Go
In this lecture I'll explain the differences between arrays and slices in Go
The difference between arrays and slices shown with example code
How to compare different types in Go if you pass a variable as "any" in a function
A demo showing what is and isn't possible with Generics in Go
Parsing a JSON that you don't know the types of requires you to use a Type Switch or the Reflect Package to figure out what types are inside the parsed json variable.
Asynchronous calls in go, together with channels to manage communication flow
Once you start using goroutines, you'll want to use mutual exclusion in certain cases to ensure your order of execution
This lecture explained how cross compiling in Go works, and what "cgo" is.
Go applications can be packaged easily in a docker image. With "docker build" I'll show you a few options to package a go app with alpine and scratch base images.
An introduction on how to use Golang with AWS
Before we can use Golang in our application, we need to generate AWS credentials
Let's launch an EC2 in Golang with the aws-sdk-go
In this demo I'll show you how to launch an EC2 in Golang
This demo shows how to upload a file to s3 with the Go AWS SDK
Now that we uploaded a file, let's try to download the file again from s3 in Go
How to test our AWS SDK code in Golang
Introduction into the Go SDK for Azure
Now that we have set up our az client, we can start writing a program to read those credentials and create our first resource: the ResourceGroup
In this lecture I'll create the vnet and the subnet necessary to launch the VM on Azure
Lecture showing how to create a Public IP address resource and a Network Security Group using the Azure Go SDK
Lecture showing how to create a Network Interface (NIC) using the Azure Go SDK
Updating a VNet with dependencies (the NIC) gives us an error. In this lecture we're creating a findVnet to solve that.
After we created all our dependencies, we can finally launch our VM!
How to use Kubernetes in Golang
In this demo I show you how to write an application that deploys a container on Kubernetes
Now that we have our application deployed, how do we run consecutive deployments
Our application is deployed, but now we want to check whether are pods are running
In the previous lecture I showed you how to build a GitHub Webhooks Kubernetes integration. Now I'm going to deploy that example in a docker container in the Kubernetes cluster itself
In this demo I'm going to integrate GitHub with Kubernetes. Our deployment yaml files will be stored in a git repository. GitHub webhooks will be triggered when a file is added or a change is made. The files committed will then be deployed on our Kubernetes cluster.
In this lecture I'm using the rsa and ssh package to create a new set of SSH keys
An introduction to the upcoming SSH client and server lectures
In this lecture we're going to build an SSH server!
If you want to execute single SSH commands, then you need to implement the "exec" request call, which we're doing in this demo
This lecture shows how to make client connections in Go with Dial.
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.