The Many Faces of Struct Tags
Offered By: Gopher Academy via YouTube
Course Description
Overview
Explore the versatile applications of struct tags in Go through this 22-minute conference talk from GopherCon 2015. Delve into practical and unconventional uses of this underutilized feature, including object-relational mapping, validation functions, middleware definition, and command-line options. Learn about namespacing, serialization, tag safety, and the potential for code generation with struct tags. Gain insights into clever implementations like the MustHave tag and unusual mapping cases, as well as their role in handling default values and type validation. Discover how struct tags can enhance your Go programming beyond common JSON and XML field specifications.
Syllabus
Intro
Why are we here?
What we've built
What is a struct tag?
Why?
Namespacing
Serialization
Tag Safety
MustHave Tag
A More Unusual Mapping Case
Command-line Configuration
Default Values
How About Type Validation?
Foreign Languages
The Future: Code Generation?
Taught by
Gopher Academy
Related Courses
Разработка веб-сервисов на Go - основы языкаMoscow Institute of Physics and Technology via Coursera Getting Started with Go
University of California, Irvine via Coursera Concurrency in Go
University of California, Irvine via Coursera Functions, Methods, and Interfaces in Go
University of California, Irvine via Coursera Game Thinking: Juego y toma de decisiones
The Pontificia Universidad Javeriana via edX