errors

package
v0.0.0-...-4fa8d7d Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoContent = NewHttpError(http.StatusNoContent, "No content")

Constante para o erro "no content"

Functions

func HandleError

func HandleError(w http.ResponseWriter, err HttpError)

func IsNoContentError

func IsNoContentError(err error) bool

IsNoContentError verifica se o erro é relacionado a "no content"

func RespondWithError

func RespondWithError(w http.ResponseWriter, statusCode int, message string, IncludeStatus bool)

Types

type HttpError

type HttpError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	// contains filtered or unexported fields
}

func NewHttpError

func NewHttpError(statusCode int, message string) HttpError

Jump to

Keyboard shortcuts

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