Add CI pipelines, fix linting issues (#12)

This commit is contained in:
T. von Dein
2026-05-07 15:01:18 +02:00
parent 5e82a3706b
commit 38ed9de0b4
14 changed files with 257 additions and 97 deletions

View File

@@ -44,7 +44,7 @@ func SnapshotList(conf *cfg.Config) error {
// get partial indicies
ires, err := conf.DefaultCluster.ES.Cat.Indices().Do(context.Background())
if err != nil {
return fmt.Errorf("Error getting indicies: %s", err)
return fmt.Errorf("failed to get indicies: %s", err)
}
indicies := map[string]int{}
@@ -57,7 +57,7 @@ func SnapshotList(conf *cfg.Config) error {
// get snapshots
sres, err := conf.DefaultCluster.ES.Cat.Snapshots().Do(context.Background())
if err != nil {
return fmt.Errorf("Error getting snapshots: %s", err)
return fmt.Errorf("failed to get snapshots: %s", err)
}
slog.Debug("ES result", "indicies", sres)
@@ -97,7 +97,9 @@ func SnapshotList(conf *cfg.Config) error {
}
table.Sort()
table.PrintMarkdown()
if err := table.PrintMarkdown(); err != nil {
return err
}
return nil
}
@@ -135,7 +137,9 @@ func SnapshotShow(conf *cfg.Config, snapshot string) error {
{"shards-successful", fmt.Sprintf("%d", snap.Shards.Successful)},
}
table.PrintMarkdown()
if err := table.PrintMarkdown(); err != nil {
return err
}
return nil
}