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

package v1

import "github.com/go-chi/chi/_examples/versions/presenter/v1"

Index

Variables

var Presenter = render.NewPresenter(ArticleV2ToV1)

Types

type Article

type Article struct {
	*v2.Article `json:",inline" xml:",inline"`

	Data map[string]bool `json:"data" xml:"data"`
}

Article presented in API version 1.

func ArticleV2ToV1

func ArticleV2ToV1(r *http.Request, from *v2.Article) (*Article, error)

Source Files

article.go

Version
v2.0.0+incompatible
Published
Jan 6, 2017
Platform
windows/amd64
Imports
4 packages
Last checked
5 days ago

Tools for package owners.