utils

package module
v0.0.0-...-1b37666 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2023 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleHTTPError

func HandleHTTPError(c *gin.Context, err error, httpStatus int, message string) bool

handleHTTPError handles the HTTP error by returning a JSON response with the error message. If the error is not nil, it returns true, otherwise false.

func HandleObjectError

func HandleObjectError(c *gin.Context, obj interface{}, httpStatus int, message string)

handleObjectError handles the object error by returning a JSON response with the error message. If the object is nil, it returns true, otherwise false.

Types

This section is empty.

Jump to

Keyboard shortcuts

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