From a6fe8fe799bdc8e9ba2d631ae32c112bf93d6ef9 Mon Sep 17 00:00:00 2001 From: Matthew Rich Date: Fri, 27 Sep 2024 03:58:14 +0000 Subject: [PATCH] fix lint errors --- internal/client/client.go | 4 +++- internal/folio/document.go | 7 ------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/internal/client/client.go b/internal/client/client.go index 8a246f2..180f984 100644 --- a/internal/client/client.go +++ b/internal/client/client.go @@ -316,7 +316,9 @@ func (a *App) ConfigCmd(docs []string, includeSystemConfig bool) (err error) { } if includeSystemConfig { - _, err = a.emitter.Emit(a.Config, nil) + if _, err = a.emitter.Emit(a.Config, nil); err != nil { + return + } } _, err = a.emitter.(data.ManyEmitter).EmitMany(a.Documents, nil) return diff --git a/internal/folio/document.go b/internal/folio/document.go index 88d0579..f0ca805 100644 --- a/internal/folio/document.go +++ b/internal/folio/document.go @@ -275,12 +275,7 @@ func (d *Document) Apply(state string) error { slog.Info("Document.Apply() applying resource", "index", idx, "uri", d.ResourceDeclarations[idx].Resource().URI(), "resource", d.ResourceDeclarations[idx].Resource()) if d.ResourceDeclarations[idx].Requires.Check() { - -// fmt.Fprintf(os.Stderr, "%s: ", d.ResourceDeclarations[idx].Resource().URI()) - if e := d.ResourceDeclarations[idx].Apply(state); e != nil { -// slog.Error("Document.Apply() error applying resource", "index", idx, "uri", d.ResourceDeclarations[idx].Resource().URI(), "error", e) -// fmt.Fprintf(os.Stderr, "%s\n", "error") d.ResourceDeclarations[idx].Error = e.Error() switch d.ResourceDeclarations[idx].OnError.GetStrategy() { case OnErrorStop: @@ -288,8 +283,6 @@ func (d *Document) Apply(state string) error { case OnErrorFail: d.failedResources++ } - } else { -// fmt.Fprintf(os.Stderr, "%s\n", state) } } else { d.ResourceDeclarations[idx].Error = fmt.Sprintf("Constraint failure: %s", d.ResourceDeclarations[idx].Requires)