How to build Async/Await in Go (like in JavaScript/C#)

Опубликовано: 08 Апрель 2026
на канале: Flo Woelki
7,248
286

Advertisement/Werbung: Try Sevalla now and receive $50 of free credits: https://sevalla.com/?utm_source=flowo...

In this video, we are going to explore how to create a toy implementation of Async/Await in Go. If you want to learn something about Trace Flight Recording in Go, feel free to check out this video:    • The new Trace Flight Recorder in Go 1.25 i...  


📝 Description
Ever wanted JavaScript or C#-style Async/Await in Go? In this video, we'll build a custom Future type using Go generics that brings familiar async programming patterns to Go's concurrent world. We'll explore how to implement this pattern from scratch, and learn some important concurrency concepts along the way. It's important, though, that this video is only for educational reasons and should NOT be used in production. You'll learn the following things:
• What Future types are and how they differ from channels
• How to implement Async/Await patterns using Go generics and concurrency features
• Advanced error handling with panic recovery
• Practical concurrency patterns with goroutines and channels


⏳ Timestamps:
00:00 - Introduction
00:29 - API design
02:36 - fetchUserData
03:26 - async/await implementation
11:07 - Testing
12:57 - panic handling
17:04 - Testing
17:59 - Outro


👋 Hey there!
If you are new to this channel: Hey 👋 my name is Flo and I am a professional software engineer with a passion for coding in Golang, TypeScript, JavaScript, and Rust. This channel is where I share that passion and dive into the exciting world of software engineering.


📨 Support and Connect!
Become a member.    / @flowoelki  
Discord:   / discord  
X / Twitter: https://x.com/FlorianWoelki
LinkedIn:   / florian-woelki  
GitHub: https://github.com/FlorianWoelki


📝 Copyright Notice
The original Go Gopher was designed by Renée French (Source: https://go.dev/blog/gopher License details: https://creativecommons.org/licenses/.... The gopher appearing in this video and thumbnail is modified from the original design.


#go #asyncawait #async #await