Some checks failed
Test / test (1.24.x, ubuntu-latest) (push) Successful in 2m56s
Test / test (1.25.x, ubuntu-latest) (push) Successful in 2m15s
Test / test (1.26.x, ubuntu-latest) (push) Successful in 2m23s
Test / test (1.27.x, ubuntu-latest) (push) Failing after 3m56s
Test / test (1.24.x, windows-latest) (push) Has been cancelled
Test / test (1.25.x, windows-latest) (push) Has been cancelled
Test / test (1.26.x, windows-latest) (push) Has been cancelled
Test / test (1.27.x, windows-latest) (push) Has been cancelled
23 lines
399 B
Go
23 lines
399 B
Go
package v1
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/go-chi/chi/v5/_examples/versions/data"
|
|
)
|
|
|
|
// Article presented in API version 1.
|
|
type Article struct {
|
|
*data.Article
|
|
|
|
Data map[string]bool `json:"data" xml:"data"`
|
|
}
|
|
|
|
func (a *Article) Render(w http.ResponseWriter, r *http.Request) error {
|
|
return nil
|
|
}
|
|
|
|
func NewArticleResponse(article *data.Article) *Article {
|
|
return &Article{Article: article}
|
|
}
|