MCPcopy
hub / github.com/go-chi/chi / dbUpdateArticle

Function dbUpdateArticle

_examples/rest/main.go:493–501  ·  view source on GitHub ↗
(id string, article *Article)

Source from the content-addressed store, hash-verified

491}
492
493func dbUpdateArticle(id string, article *Article) (*Article, error) {
494 for i, a := range articles {
495 if a.ID == id {
496 articles[i] = article
497 return article, nil
498 }
499 }
500 return nil, errors.New("article not found.")
501}
502
503func dbRemoveArticle(id string) (*Article, error) {
504 for i, a := range articles {

Callers 1

UpdateArticleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected