Skip to content

Commit

Permalink
Add missing error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
TomWright committed Oct 10, 2024
1 parent 605ec48 commit d857cb9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ func RootCmd() *cobra.Command {
}

reader, err := parsing.NewReader(parsing.Format(readerStr))
if err != nil {
return fmt.Errorf("failed to get input reader: %w", err)
}
writer, err := parsing.NewWriter(parsing.Format(writerStr))
if err != nil {
return fmt.Errorf("failed to get output writer: %w", err)
}

inputBytes, err := io.ReadAll(cmd.InOrStdin())
if err != nil {
Expand Down

0 comments on commit d857cb9

Please sign in to comment.