DeleteSession apaga um arquivo de sessão.
(name string)
| 357 | |
| 358 | // DeleteSession apaga um arquivo de sessão. |
| 359 | func (sm *SessionManager) DeleteSession(name string) error { |
| 360 | filePath := sm.getSessionPath(name) |
| 361 | if _, err := os.Stat(filePath); os.IsNotExist(err) { |
| 362 | return fmt.Errorf("sessão '%s' não encontrada", name) |
| 363 | } |
| 364 | return os.Remove(filePath) |
| 365 | } |
nothing calls this directly
no test coverage detected