"Enums" in Golang are a special type that lets you create custom user-generated types to have more readable code! If you would like to know how to better secure your Go project, check out this video as well: https://youtu.be/eMAScRNHKx4
📝 Description
In this video, we dive deep into enums in Golang. Enums (short for enumerated types) are data types consisting of a predefined set of named constant values that allow a variable to store exactly one value from that set. By the end of this video, you'll have learned:
• What are enums, and how can you use them in Go
• What the iota keyword really means
• How to apply enums to your codebase
• Real use case to apply Enums for a packet analyzer
⏳ Timestamps:
00:00 - Introduction
00:26 - Enum Example 1 & iota
03:40 - Enum Example 2
04:46 - Real Use Case
15:52 - 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. Plus, I love using emojis and paper-based animations (so have a look for that if you want to find my videos).
📨 Support and Connect!
Buy me a coffee: https://www.buymeacoffee.com/florianwoelki
Become a member. https://www.youtube.com/@FloWoelki/membership
Discord: https://discord.gg/TnA7drJ
Instagram: https://www.instagram.com/flowydev/
LinkedIn: https://www.linkedin.com/in/florian-woelki/
TikTok: https://www.tiktok.com/@florianwoelki
GitHub: https://github.com/FlorianWoelki
📝 Copyright Notice
The original Go Gopher version is originally designed by Renée French (Source: https://go.dev/blog/gopher License details: https://creativecommons.org/licenses/by/4.0/). The gopher used in the video and thumbnail is inspired by this author.
#golang #go #enums