ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

Learning Golang: Functional Options / Default Configuration Values Pattern

golang

golang design pattern

golang design patterns

golang functional option

golang default configuration values

golang configuration values

golang functional options

Golang tutorial

Golang tutorial beginners

Golang beginners

golang design pattern tutorial

golang constructor

golang tutorial

learn golang

golang for beginners

go lang

Автор: Mario Carrion

Загружено: 2021-11-05

Просмотров: 4397

Описание: This is tutorial for a Go pattern, similar to the Builder pattern, that allows defining configuration values, default values and validations called: Functional Options.

This Go Pattern is possible thanks to the power of Go when defining types that happen to be functions combining them with variadic arguments in the "constructor"/initializer function using those values.

I like to use this pattern when the goals are the following:

Expressiveness, we want to clearly indicate the configuration values
Flexibility, we can add new configuration values and our users won't break
Security, we can define validation rules
Defaults, we can define values values

== Relevant Links

Example code: https://github.com/MarioCarrion/video...
Previous Episode: "Learning Golang: Versioning Tools as Dependencies using Go Modules":    • Learning Golang: Versioning Tools as Depen...  

Playlist "Learning Go":    • Learning Go/Golang  
Playlist "Software Architecture in Go":    • Software Architecture and System Design in...  
Playlist "Learning Go/Golang Concurrency Patterns"    • Learning Go/Golang Concurrency Patterns  
Playlist "Building Microservices in Go":    • Building Microservices in Golang/Go  
Playlist "GoTools and Packages":    • Golang/Go Tools and Packages  
Playlist "Testing in Go":    • Testing in Golang/Go  

== Socials

  / mariocarrion  
  / mario.carrion  
  / mariocarrion  

00:00 Introduction to Golang Function Options / Default Values
04:03 Extract arguments as a new type
06:46 Adding Functional Options
13:33 Adding Validation and errors
17:40 Adding Default Values
19:20 Conclusion

---

Who am I:

Hello👋🏼! I'm Mario, a Hands-on Software Architect and Lead Backend Engineer with more than 16 years of professional experience building all kinds of software including on-premise Industrial Automation Systems, Linux Accessibility Desktop and Browser Components as well as Distributed Advertising Microservices.

Every week I will share with you different topics I've learned while working for small startups and large companies including the processes I've followed over the years for successfully delivering complex enterprise systems from start to end.

Subscribe if you like Software Development, Software Architecture and Systems Design!

Keep it up. Don't give up!

#golang #designpatterns #programming

--- Our affiliate links below

Shop our Amazon favorites → https://www.amazon.com/shop/rubycarrion
Shop my IG feed on my LIKEtoKNOWit (LTK) page → https://www.liketoknow.it/RubyCarrion
Shop Top Deals and Featured Offers at Best Buy → https://bestbuy.7tiv.net/c/2558226/68...
Get a 30 day FREE Trial of Epidemic Sound → https://www.epidemicsound.com/referra...
Try Amazon Prime 30-day FREE Trial → https://amzn.to/3yf9a0f
I love getting Cash Back and think you will too! Join for FREE and get $30 when you spend $30 → https://www.rakuten.com/r/RUBYRA132?e...

--- Our Vlog Channel

   / rubycarrion  

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
Learning Golang: Functional Options / Default Configuration Values Pattern

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]