Save saves the session data and updates the cookie Note: If the session is being used in the handler, calling Save will have no effect and the session will automatically be saved when the handler returns. Returns: - error: An error if the save operation fails. Usage: err := s.Save()
()
| 338 | // |
| 339 | // err := s.Save() |
| 340 | func (s *Session) Save() error { |
| 341 | return s.SaveWithContext(s.resolveContext()) |
| 342 | } |
| 343 | |
| 344 | // SaveWithContext saves the session data and updates the cookie, |
| 345 | // using the provided context for cancellation and timeout control. |