From 506a74f7ea8f414ae76a71f60df2ad40e427d197 Mon Sep 17 00:00:00 2001 From: Maksim Panfilov Date: Thu, 17 Oct 2024 18:40:42 +0300 Subject: [PATCH] Update README.md --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 6bd141d..e26dfef 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,8 @@ import ( func main() { err := stacktrace.New("An error occurred", stacktrace.WithLocation("/path/to/file"), stacktrace.WithPosition(stacktrace.NewPosition(10, 1))) fmt.Println(err) - // Output: - // /path/to/file:10:1: An error occurred + // Output: + // /path/to/file:10:1: An error occurred } ``` @@ -49,8 +49,8 @@ func main() { baseErr := fmt.Errorf("base error") wrappedErr := stacktrace.NewWrapped("an error occurred", baseErr, stacktrace.WithLocation("/path/to/file"), stacktrace.WithPosition(stacktrace.NewPosition(10, 1))) fmt.Println(wrappedErr) - // Output: - // /path/to/file:10:1: an error occurred: base error + // Output: + // /path/to/file:10:1: an error occurred: base error unwrappedErr, ok := stacktrace.Unwrap(wrappedErr) if ok { @@ -58,8 +58,8 @@ func main() { } wrappedErr2 := stacktrace.Wrap(baseErr, stacktrace.WithLocation("/path/to/file"), stacktrace.WithPosition(stacktrace.NewPosition(10, 1))) - fmt.Println(wrappedErr2) - // Output: + fmt.Println(wrappedErr2) + // Output: // /path/to/file:10:1: base error } ``` @@ -107,4 +107,4 @@ func main() { * `WithEnsureDuplicates() TracesOpt`: Ensures that duplicates are not printed in traces. ## Contributing -Contributions are welcome! Please open an issue or submit a pull request. \ No newline at end of file +Contributions are welcome! Please open an issue or submit a pull request.