Skip to content

Commit

Permalink
#133 Better error formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
docktermj committed Nov 7, 2024
1 parent ea80d5a commit f080b52
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions fileutil/fileutil_examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func ExampleCopyFile() {
sourceFilePath := filepath.Join(os.TempDir(), "source-file.txt")
err := os.WriteFile(sourceFilePath, []byte("Hello, World!"), 0600)
if err != nil {
fmt.Print(err)
fmt.Println(err)
}

// define the target path to copy the file to
Expand All @@ -33,7 +33,7 @@ func ExampleCopyFile_toDirectory() {
sourceFilePath := filepath.Join(os.TempDir(), "source-file.txt")
err := os.WriteFile(sourceFilePath, []byte("Hello, World!"), 0600)
if err != nil {
fmt.Print(err)
fmt.Println(err)
}

// define the target path to copy the file to
Expand Down
4 changes: 2 additions & 2 deletions fileutil/fileutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,13 @@ func createTextFileN(path string, byteCount int64) (int64, error) {
func TestMain(m *testing.M) {
err := setup()
if err != nil {
fmt.Print(err)
fmt.Println(err)
os.Exit(1)
}
code := m.Run()
err = teardown()
if err != nil {
fmt.Print(err)
fmt.Println(err)
}
os.Exit(code)
}
Expand Down

0 comments on commit f080b52

Please sign in to comment.