Главная
Study mode:
on
1
Intro
2
Why are we here?
3
What we've built
4
What is a struct tag?
5
Why?
6
Namespacing
7
Serialization
8
Tag Safety
9
MustHave Tag
10
A More Unusual Mapping Case
11
Command-line Configuration
12
Default Values
13
How About Type Validation?
14
Foreign Languages
15
The Future: Code Generation?
Description:
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.

The Many Faces of Struct Tags

Gopher Academy
Add to list
0:00 / 0:00