I am trying to create a struct field, and limit its values to a list of values i.e,
state =["locked", "unlocked"]
now in Django models we use the field choices i.e
class Book(models.Model):
LOCKED = 'LK'
UNLOCKED = 'UN'
STATE = [
('LK', 'Locked'),
('UL', 'Unlocked'),
]
book_state = models.CharField(choices=STATE, default=LOCKED)
trying to replicate the above using a gorm.model struct data type in Go.