Skip to content

Commit 246d2e6

Browse files
committed
Fix linting error
Signed-off-by: Radoslav Dimitrov <[email protected]>
1 parent 8823c6d commit 246d2e6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmd/import-from-toolhive/main.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,10 @@ func importEntry(name string, server *toolhiveRegistry.ImageMetadata, outputDir
199199
if err := encoder.Encode(server); err != nil {
200200
return fmt.Errorf("failed to marshal YAML: %w", err)
201201
}
202-
encoder.Close()
202+
err := encoder.Close()
203+
if err != nil {
204+
return fmt.Errorf("failed to close YAML encoder: %w", err)
205+
}
203206
yamlData := buf.Bytes()
204207

205208
// Add a header comment with metadata

0 commit comments

Comments
 (0)