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

package v2

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

Index

Variables

var Presenter = render.NewPresenter(ArticleV3ToV2)

Types

type Article

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

	// Additional fields.
	SelfURL string `json:"self_url" xml:"self_url"`

	// Omitted fields.
	URL interface{} `json:"url,omitempty" xml:"url,omitempty"`
}

Article presented in API version 2.

func ArticleV3ToV2

func ArticleV3ToV2(r *http.Request, from *v3.Article) (*Article, error)

Source Files

article.go

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

Tools for package owners.