Skip to content

Commit

Permalink
feat: Add LoadPriest for Preparer
Browse files Browse the repository at this point in the history
  • Loading branch information
dapeng committed Nov 6, 2024
1 parent 5fc2b15 commit 03e773b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions prepare.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ func (p *Preparer) Bury(goner Goner) *Preparer {
return p.Load(goner)
}

func (p *Preparer) LoadPriest(priests ...Priest) *Preparer {
for _, priest := range priests {
err := priest(p.heaven.GetCemetery())
if err != nil {
panic(err)
}
}
return p
}

func Prepare(priests ...Priest) *Preparer {
h := New(priests...)

Expand Down

0 comments on commit 03e773b

Please sign in to comment.