feat: json importer

This commit is contained in:
abelith committed 2026-08-21 15:48:02 +05:00
1 parent 69af7eaee3
commit c41d13bb77
3 files changed
+40

No files matched your search

+5
View File
@@ -100,12 +100,17 @@ func (a *Application) ImportSpells(
name string,
r io.Reader,
) error {
ctx, cancel := context.WithCancel(ctx)
defer cancel()
ch, errCh, err := importer.Import(ctx, name, r)
if err != nil {
cancel()
return err
}
if err := a.spellCmd.Import(ctx, ch); err != nil {
cancel()
return err
}