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

Function dbNewArticle

_examples/rest/main.go:469–473  ·  view source on GitHub ↗
(article *Article)

Source from the content-addressed store, hash-verified

467}
468
469func dbNewArticle(article *Article) (string, error) {
470 article.ID = fmt.Sprintf("%d", rand.Intn(100)+10)
471 articles = append(articles, article)
472 return article.ID, nil
473}
474
475func dbGetArticle(id string) (*Article, error) {
476 for _, a := range articles {

Callers 1

CreateArticleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected