From 03e773ba918651e87d04bfb0f9835c374e4714c9 Mon Sep 17 00:00:00 2001 From: dapeng Date: Wed, 6 Nov 2024 21:01:51 +0800 Subject: [PATCH] feat: Add LoadPriest for Preparer --- prepare.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/prepare.go b/prepare.go index 0314a7d..eab81bd 100644 --- a/prepare.go +++ b/prepare.go @@ -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...)