mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-19 13:38:06 +01:00
♻️ Refactor av data structure
This commit is contained in:
parent
ad77e4d7f3
commit
ff239c1211
3 changed files with 60 additions and 55 deletions
|
|
@ -168,13 +168,14 @@ func SaveAttributeView(av *AttributeView) (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func (av *AttributeView) GetView(viewID string) (ret *View) {
|
||||
func (av *AttributeView) GetView(viewID string) (ret *View, err error) {
|
||||
for _, v := range av.Views {
|
||||
if v.ID == viewID {
|
||||
ret = v
|
||||
return
|
||||
}
|
||||
}
|
||||
err = ErrViewNotFound
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue