refactor Import()

This commit is contained in:
2024-12-22 11:29:12 +01:00
parent dc328afa44
commit be79886e89
3 changed files with 52 additions and 29 deletions

View File

@@ -279,7 +279,13 @@ func Import(conf *cfg.Config) *cobra.Command {
// errors at this stage do not cause the usage to be shown
cmd.SilenceUsage = true
return conf.DB.Import(&attr)
out, err := conf.DB.Import(&attr)
if err != nil {
return err
}
fmt.Print(out)
return nil
},
}