package utilService import ( "GoClouds/cloud/sysCloud" "gopkg.in/macaron.v1" "reflect" ) func MidCheckUser(c *macaron.Context) { lguser := sysCloud.CurrUser(c) if lguser == nil { c.PlainText(403, []byte("未登录")) } c.Set(reflect.TypeOf(lguser), reflect.ValueOf(lguser)) }