I have a user struct that corresponds to an entity. How can I add a new property active
and set the default value to true
?
Can I also set the value of that property to true
for all existing entities by some easy method?
type User struct {
Id int64 `json:"id"`
Name string `json:"name"`
}
Bonus questions: I don't quite understand the syntax in the struct. What do the three columns represent? What do the JSON strings have ``around them?