Documentation ¶
Overview ¶
https://blog.questionable.services/article/http-handler-error-handling-revisited/
Index ¶
Constants ¶
View Source
const ContextKeyIsAuthenticated = contextKey("isAuthenticated")
Variables ¶
This section is empty.
Functions ¶
func IsAuthenticated ¶
IsAuthenticated checks the current request for an authenticated user.
Types ¶
type Error ¶
Error represents a handler error. It provides methods for a HTTP status code and embeds the built-in error interface.
type NeuteredFileSystem ¶
type NeuteredFileSystem struct {
Fs http.FileSystem
}
NeuteredFileSystem is a custom file system to disable directory listings.
type StatusError ¶
StatusError represents an error with an associated HTTP status code.
func (StatusError) Error ¶
func (se StatusError) Error() string
Allows StatusError to satisfy the error interface.
Click to show internal directories.
Click to hide internal directories.