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

Types

type Article

type Article struct {
	*data.Article

	// 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 NewArticleResponse

func NewArticleResponse(article *data.Article) *Article

func (*Article) Render

func (a *Article) Render(w http.ResponseWriter, r *http.Request) error

Source Files

article.go

Version
v1.5.5 (latest)
Published
Sep 7, 2023
Platform
linux/amd64
Imports
3 packages
Last checked
2 days ago

Tools for package owners.