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

Function dbGetUser

_examples/rest/main.go:513–520  ·  view source on GitHub ↗
(id int64)

Source from the content-addressed store, hash-verified

511}
512
513func dbGetUser(id int64) (*User, error) {
514 for _, u := range users {
515 if u.ID == id {
516 return u, nil
517 }
518 }
519 return nil, errors.New("user not found.")
520}

Callers 1

NewArticleResponseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected