code: func Session(store sessions.Store, options *SessionOptions) HandlerFunc {
  	var sessionOptions *sessions.Options
  
  	if options != nil {
  		sessionOptions = &sessions.Options{
  			Path:     options.Path,
  			Domain:   options.Domain,
  			MaxAge:   options.MaxAge,
  			Secure:   options.Secure,
  			HttpOnly: options.HTTPOnly,
  		}
  	}
  
  	manager := sessions.New(512, store, sessionOptions)
  
  	return func(c *C) {
  		c.sessions = manager.GetSessions(c.Request)
  		defer manager.Close(c.sessions)
  
  		c.Writer.Before(func(ResponseWriter) {
  			c.sessions.Save(c.Writer)
  		})
  
  		c.Next()
  	}
  }
docs: //Session use session middleware