helpers

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2025 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateError

func CreateError(message string) error

CreateError returns a new error with the given message

func GetENVValue

func GetENVValue(key string) string

GetValue loads the environment variable value for a given key (case insensitive, converts input key to UPPER_SNAKE_CASE), including those loaded from .env file.

func RespondWithJSON

func RespondWithJSON(Response http.ResponseWriter, StatusCode int, Payload interface{})

RespondWithJSON writes a JSON response to the HTTP response writer. Constructs a standardized server response with payload and success flag. Sets the appropriate headers, status code, and writes the JSON data.

Types

This section is empty.

Jump to

Keyboard shortcuts

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