Fix tests and issues

This commit is contained in:
Daniel
2024-11-08 14:39:58 +01:00
parent 2d0d711938
commit ddf7ba170e
10 changed files with 325 additions and 231 deletions

View File

@@ -70,16 +70,16 @@ func init() {
}
func scan(cmd *cobra.Command, args []string) error {
bundle, err := updates.GenerateIndexFromDir(scanDir, scanConfig)
index, err := updates.GenerateIndexFromDir(scanDir, scanConfig)
if err != nil {
return err
}
bundleStr, err := json.MarshalIndent(&bundle, "", " ")
indexJson, err := json.MarshalIndent(&index, "", " ")
if err != nil {
return fmt.Errorf("marshal index: %w", err)
}
fmt.Printf("%s", bundleStr)
fmt.Printf("%s", indexJson)
return nil
}