Properly handle error and improve error messages
This commit is contained in:
@ -31,7 +31,6 @@ type SessionInfo struct {
|
||||
}
|
||||
|
||||
type UserStatus string
|
||||
type SessionNotFoundError struct{}
|
||||
|
||||
const (
|
||||
Authorized UserStatus = "authorized"
|
||||
@ -40,10 +39,6 @@ const (
|
||||
Suspicious UserStatus = "suspicious"
|
||||
)
|
||||
|
||||
func (e *SessionNotFoundError) Error() string {
|
||||
return "session not found"
|
||||
}
|
||||
|
||||
func Get(id string) *Session {
|
||||
return &Session{ID: id}
|
||||
}
|
||||
|
Reference in New Issue
Block a user