httputil

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package httputil provides HTTP utilities for LocalGo

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RespondError

func RespondError(w http.ResponseWriter, statusCode int, message string)

RespondError sends an error response

func RespondJSON

func RespondJSON(w http.ResponseWriter, statusCode int, data interface{})

RespondJSON sends a JSON response

func RespondOK

func RespondOK(w http.ResponseWriter)

RespondOK sends an OK response with no content

Types

type Error

type Error struct {
	Error string `json:"error"`
}

Error represents an error response

Jump to

Keyboard shortcuts

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