MCPcopy Index your code
hub / github.com/TruthHun/BookStack / Find

Method Find

models/options.go:48–61  ·  view source on GitHub ↗
(id int)

Source from the content-addressed store, hash-verified

46}
47
48func (p *Option) Find(id int) (*Option, error) {
49
50 if val, ok := optionCache.Load(id); ok {
51 p = val.(*Option)
52 return p, nil
53 }
54
55 o := orm.NewOrm()
56 p.OptionId = id
57 if err := o.Read(p); err != nil {
58 return p, err
59 }
60 return p, nil
61}
62
63func (p *Option) FindByKey(key string) (*Option, error) {
64

Callers

nothing calls this directly

Calls 1

ReadMethod · 0.45

Tested by

no test coverage detected