package manage import ( "github.com/gin-gonic/gin" "insure/model" ) func admin(c *gin.Context) *model.Admin { u, exists := c.Get("admin") if !exists { return nil } admin := u.(*model.Admin) return admin }