WTF is a type switch in

  Рет қаралды 844

Brian Morrison

Brian Morrison

Күн бұрын

In this video, we'll learn what a type switch is and how to use it in Go. We'll use this knowledge to create a simple example program that demonstrates how to use a type switch.
If you're new to programming, or if you just don't understand type switches very well, this video is for you! By the end of this video, you'll be able to use type switches to control the type of data that flows into and out of a Go program. So check it out, and let us teach you something new!
🗞️Join my newsletter for a weekly dose of me in your inbox!
brianmmdev.bee...
🔴 Subscribe today!
/ @brianmmdev
👋 Connect w/me:
▪ Twitter: / brianmmdev
▪ Discord: fullstack.chat
▪ Website: brianmorrison.me
▪ Twitch: / brianmmdev
__________________________________________
🖥 My Rig
▪ CoolerMaster MB511: amzn.to/2AZfPUc
▪ GIGABYTE X570 AORUS Elite Wifi: amzn.to/2AZijlt
▪ Sabrent 1TB Rocket: amzn.to/316zIDy
▪ Corsair Vengeance RGB Pro 64GB: amzn.to/3epbybf
▪ AMD Ryzen 9 3900X: amzn.to/2CxwYov
▪ ASUS ROG STRIX GeForce GTX 1080: amzn.to/3hYuEar
__________________________________________
🎥 Streaming Gear
▪ SteelSeries Arctis 7: amzn.to/3hOUpJX
▪ Elgato Game Capture HD60 Pro: amzn.to/2V8nTc8
▪ Logitech C922x Pro Stream: amzn.to/2V7PKZY
▪ TaoTronics Camera Light: amzn.to/37QI4Ax
▪ InnoGear Microphone Arm: amzn.to/37Ql8Bk
▪ Audio-Technica AT2005USB: amzn.to/3ajIuRh
__________________________________________
📚 Other Excellent Learning Resources
▪ freeCodeCamp: www.freecodeca...
Please note that links in this description may or may not be affiliate links, where I make a small commission if used.
Thanks For Watching!

Пікірлер: 4
@PeterBenjamin-KH
@PeterBenjamin-KH Жыл бұрын
These are the times when I feel like I want proper enums in Go. There is Go proposal for proper enums in Go, but there is no consensus from the team or the community. For now, there is "enumer" utility (designed following Rob Pike's "stringer" utility) that scaffolds/generates the boilerplate that you just typed in this video. 🙂
@brianmmdev
@brianmmdev Жыл бұрын
I agree. Ive resorted to using specially named constants but it’s not the same.
@Huboh
@Huboh 9 ай бұрын
Nice content dude! As a general rule, to make your code more flexible and to explicitly declare what functionality is being used, your functions should accept interfaces and return structs. Exception to this is returning the error interface
The Biggest React Framework You've Never Heard of
20:29
Theo - t3․gg
Рет қаралды 49 М.
How to Build Effective AI Agents (without the hype)
24:27
Dave Ebbelaar
Рет қаралды 100 М.
How to have fun with a child 🤣 Food wrap frame! #shorts
0:21
BadaBOOM!
Рет қаралды 17 МЛН
Hilarious FAKE TONGUE Prank by WEDNESDAY😏🖤
0:39
La La Life Shorts
Рет қаралды 44 МЛН
docker compose Управление командами через Makefile make
12:19
ToyBattle | Бесплатные курсы Программирования
Рет қаралды 173
This AI Robot Is Doing the Impossible - Unitree x ElizaWakesUp
9:30
AI Revolution
Рет қаралды 163 М.
GM LEVY IS BACK!!!!!!!!!!
26:30
GothamChess
Рет қаралды 319 М.
#trending #foryou #challenge #fyp #viral #short #tiktok #vs
0:15
Misiсatсh
Рет қаралды 2,4 МЛН
ЛАЙФХАК НА КУХНЕ ! 🧐🤦🏻‍♂️ #shorts #лайфхак
0:15
Крус Костилио
Рет қаралды 109 М.
три кошака и ростелеком
0:26
Мистер Денала
Рет қаралды 2,4 МЛН
Это лютый угар 🤣 | приколы Арсен Симонян
0:14
Арсен Симонян
Рет қаралды 294 М.