feat: json importer
This commit is contained in:
1 parent
69af7eaee3
commit
c41d13bb77
3 files changed
+40
No files matched your search
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user