util

package
v0.0.0-...-102eb4e Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyHeaders

func CopyHeaders(h map[string][]string) map[string][]string

Copies the headers from h into a new map of string slices.

func DecodeJSONBody

func DecodeJSONBody(w http.ResponseWriter, r *http.Request, contentType string, dst interface{}) error

func SetHeaders

func SetHeaders(src, dest map[string][]string)

Assigns the headers in dest from src

func StreamToResponseWriter

func StreamToResponseWriter(r *bufio.Reader, w http.ResponseWriter, bufSize int) error

Streams the data from the response 'r' into the response writer 'w'.

Types

type MalformedParserReponse

type MalformedParserReponse struct {
	Status int
	Msg    string
}

func (*MalformedParserReponse) Error

func (mr *MalformedParserReponse) Error() string

Jump to

Keyboard shortcuts

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