Re: [go-nuts] Newbie question about struct definition

2018-12-03 Thread Brian Hatfield
Hi Freddy! Those are Struct Tags (see here for more ) and are a way to add some metadata to struct fields that can be accessed via reflection. Lots of libraries use these to denote names or other notes about each fields. Those libraries expect to have a "known" st

[go-nuts] Newbie question about struct definition

2018-12-03 Thread Freddy Martinez
Hey guys, I’ve been learning Go for the lat couple of weeks but now that I’m looking to more advanced topics, I’ve seen things like type Person struct { FirstName string `db:"first_name"` LastName string `db:"last_name"` Email string } What `db:”first_name”` means ? Regards =