Go (Golang) for Beginners: Syntax, Concurrency and Building REST APIs
A 57-lesson walkthrough of Go, starting with installation and core syntax (types, slices, maps, structs, control flow, functions, methods, defer) and moving to file handling, HTTP requests, JSON and modules. It then builds a course-CRUD REST API and a MongoDB-backed movie API, and finishes with goroutines, wait groups, mutexes, race conditions and channels. Suits beginners with some programming background who want to build small web APIs in Go.
- 57 lessons
- 10h 4m total
- Development
- English
- Earns YodaCoins
Curated by YodaHut. These lessons are hosted on YouTube and produced by their original creators, who are not affiliated with YodaHut. You still earn YodaCoins, keep your streak and track progress here.
What You'll Learn
- Install Go, set up a workspace and build executables for Windows, Linux and macOS
- Use Go's core data types: variables, constants, pointers, arrays, slices, maps and structs
- Write control flow, functions, methods and defer statements in idiomatic Go
- Make GET and POST requests, send form and JSON data, and encode and decode JSON
- Build a REST API with models, controllers and routes supporting create, read, update and delete
- Connect a Go API to MongoDB and perform insert, update, delete and fetch operations
- Run concurrent code with goroutines, wait groups, mutexes and channels, and spot race conditions and deadlocks
Prerequisites
- Basic programming familiarity (variables, loops, functions) is helpful but not strictly required
- A computer where you can install Go and a code editor
- Some understanding of HTTP and JSON helps for the API sections
Course Curriculum
57 lessons · 10h 4m- 01Welcome to the Go Programming Series4:59
- 02Before You Start with Go7:53
- 03Installing Go and Hello World11:44
- 04GOPATH and Reading Go Docs7:10
- 05The Go Lexer and Types7:28
- 06Variables, Types and Constants17:29
- 07Comma-Ok Syntax and Packages11:41
- 08Type Conversions10:33
- 09Handling Time11:44
- 10Building for Windows, Linux and Mac3:46
- 11Memory Management5:36
- 12Pointers10:51
- 13Arrays6:52
- 14Slices14:58
- 15Removing a Value from a Slice by Index5:35
- 16Maps8:36
- 17Structs8:11
- 18If/Else8:38
- 19Switch Case and the Online Playground9:45
- 20Loops, Break, Continue and Goto12:20
- 21Functions13:36
- 22Methods8:25
- 23Defer10:27
- 24Working with Files12:40
- 25Handling Web Requests12:12
- 26Handling URLs13:43
- 27Creating a Server for a Frontend9:22
- 28Making a GET Request11:46
- 29Making a POST Request with JSON Data8:24
- 30Sending Form Data5:48
- 31Creating JSON Data15:44
- 32Consuming JSON Data13:42
- 33Go Modules in Depth27:16
- 34Building an API: Models12:08
- 35Returning All Courses as JSON7:35
- 36Getting One Course by Request ID7:36
- 37Add a Course Controller11:18
- 38Update a Course Controller9:55
- 39Delete a Course Controller5:02
- 40Handling and Testing Routes20:25
- 41MongoDB Setup for the API10:28
- 42Defining Models for the Netflix App6:40
- 43Connecting to the Database11:33
- 44Inserting Data into MongoDB11:04
- 45Updating a Record in MongoDB8:07
- 46Delete One and Delete Many in MongoDB9:01
- 47Getting All Records from a Collection10:16
- 48Getting All Movies from the Database5:07
- 49Marking a Movie as Watched7:17
- 50Deleting One and All Movies4:21
- 51Creating Routes and Testing the API15:12
- 52Concurrency and Goroutines13:18
- 53Wait Groups11:54
- 54Mutex5:41
- 55Race Conditions18:46
- 56Channels and Deadlock18:39
- 57Math, Crypto and Random Numbers13:18
About the Instructor
Hitesh Choudhary
YouTube creator
The lessons in this course were produced by Hitesh Choudhary and are published on YouTube. YodaHut selected and sequenced them into this course; we did not make them, and Hitesh Choudhary is not affiliated with YodaHut.
Visit the channel on YouTubeMore in the Library: Development

Python y Django desde cero: sistema de facturación completo

Django desde cero: plantillas, modelos, formularios y panel de administración

Django desde cero: del primer proyecto a vistas basadas en clases y APIs con JWT

Cursor AI Editor for Beginners: Setup, Debugging, Refactoring and Documentation

AI-Assisted Coding with GitHub Copilot in VS Code
