Original post

In Go, we use structs to define and group data, as we would use classes in other OOP languages. However, in Go the naming of attributes within the struct is important because if it starts with a lower-case it’s seen as private and with an upper-case first letter it’s seen as public.
We can encode these structs into data formats like json but we might want to rename the fields, struct tags allow us to do this.