_examples/rest/main.go
func DeleteArticle(w http.ResponseWriter, r *http.Request) {
	var err error

	// Assume if we've reach this far, we can access the article
	// context because this handler is a child of the ArticleCtx
	// middleware. The worst case, the recoverer middleware will save us.
	article := r.Context().Value("article").(*Article)

	article, err = dbRemoveArticle(article.ID)
	if err != nil {
		render.Render(w, r, ErrInvalidRequest(err))
		return
	}

	render.Render(w, r, NewArticleResponse(article))
}
func DeleteArticle(w http.ResponseWriter, r *http.Request) {
	var err error

	// Assume if we've reach this far, we can access the article
	// context because this handler is a child of the ArticleCtx
	// middleware. The worst case, the recoverer middleware will save us.
	article := r.Context().Value("article").(*Article)

	article, err = dbRemoveArticle(article.ID)
	if err != nil {
		render.Render(w, r, ErrInvalidRequest(err))
		return
	}

	render.Render(w, r, NewArticleResponse(article))
}
func DeleteArticle ( w http . ResponseWriter , r * http . Request ) { var err error // Assume if we've reach this far, we can access the article // context because this handler is a child of the ArticleCtx // middleware. The worst case, the recoverer middleware will save us. article := r . Context ( ) . Value ( " " ) . ( * Article ) article , err = dbRemoveArticle ( article . ID ) if err != nil { render . Render ( w , r , ErrInvalidRequest ( err ) ) return } render . Render ( w , r , NewArticleResponse ( article ) ) }
// DeleteArticle removes an existing Article from our persistent store.
DeleteArticle removes an existing Article from our persistent store .