Deprecated: Please upgrade to the latest major version: go get github.com/go-chi/chi/v5

package render

import "github.com/go-chi/chi/render"

Index

Constants

const (
	ContentTypePlainText = iota
	ContentTypeHTML
	ContentTypeJSON
	ContentTypeEventStream
	ContentTypeXML
)

Functions

func Bind

func Bind(r io.Reader, v interface{}) error

func HTML

func HTML(w http.ResponseWriter, status int, v string)

func JSON

func JSON(w http.ResponseWriter, status int, v interface{})

func Noop

func Noop(w http.ResponseWriter)

func ParseContentType

func ParseContentType(next chi.Handler) chi.Handler

func Respond

func Respond(w http.ResponseWriter, status int, v interface{})

func String

func String(w http.ResponseWriter, status int, v string)

func XML

func XML(w http.ResponseWriter, status int, v interface{})

Types

type ContentType

type ContentType int

Source Files

bind.go content_type.go render.go

Version
v0.9.0
Published
Mar 31, 2016
Platform
windows/amd64
Imports
10 packages
Last checked
5 days ago

Tools for package owners.