utils

package
v1.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorTitleFor404       = "404 - The webpage you are requesting does not exist on the site"
	ErrorDescriptionFor404 = `` /* 285-byte string literal not displayed */
	ErrorTitleFor500       = "Sorry, there is a problem with the service"
	ErrorDescriptionFor500 = `` /* 250-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func AssetDIR added in v1.8.0

func AssetDIR(dir string) *assetfs.AssetFS

AssetDIR similiar to assetFS() but requires a directory name

func SetErrorDetails added in v1.7.0

func SetErrorDetails(status int, errorDetails *mapper.ErrorDetails)

SetErrorDetails returns errors details for 404 status code or else returns error message details as for a 500 status code.

func SetStatusCode added in v1.7.0

func SetStatusCode(req *http.Request, w http.ResponseWriter, err error) int

SetStatusCode returns the response status code

Types

type ClientError added in v1.7.0

type ClientError interface {
	Error() string
	Code() int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL