package auth type Role string const ( RoleAdmin Role = "admin" RoleUser Role = "user" ) type Context struct { UserID uint Username string Role Role } func (c *Context) IsAdmin() bool { return c.Role == RoleAdmin }