util

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ERROR

func ERROR(w http.ResponseWriter, statusCode int, err error)

ERROR generates a response in json from an error

func JSON

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

JSON generates a web response in json

func String

func String(v string) *string

Types

type ErrorResponse

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

Jump to

Keyboard shortcuts

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