package entity type UserRole string const ( UserBenefactorRole = UserRole("benefactor") ) var UserRoleStrings = map[UserRole]string{ UserBenefactorRole: "benefactor", } func (s UserRole) String() string { return UserRoleStrings[s] }