From 27eb3db9d61eec82f35b0b66e55dc021ab38be49 Mon Sep 17 00:00:00 2001 From: Orestis Floros Date: Mon, 7 Jul 2025 12:01:59 +0200 Subject: [PATCH] Update README.md: Fix typos --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index be8badd..c0a9cb3 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # noinlineerr -A go linter that forbids inline error handling using `if err := ...; err != nil`. +A Go linter that forbids inline error handling using `if err := ...; err != nil`. --- ## Why? -Inline error handling in Go can hurt readibility by hiding the actual function call behind error plubming. -We believe errors and function deserve their own spotlight. +Inline error handling in Go can hurt readability by hiding the actual function call behind error plumbing. +We believe errors and functions deserve their own spotlight. Instead of: ```go @@ -14,7 +14,7 @@ if err := doSomething(); err != nil { return err } ``` -Prefer more explicit and readable: +Prefer the more explicit and readable: ```go err := doSomething() if err != nil { @@ -37,7 +37,7 @@ go install github.com/AlwxSin/noinlineerr/cmd/noinlineerr@latest noinlineerr ./... ``` -⚠️ Note: the linter detects inline error assignments only when the error variable is explicitly typed or deducible. It doesn't handle dynamically typed interfaces (e.g. foo().Err() where Err() returns error via interface). +⚠️ Note: The linter detects inline error assignments only when the error variable is explicitly typed or deducible. It doesn't handle dynamically typed interfaces (e.g., `foo().Err()` where `Err()` returns an error via an interface). --- @@ -51,4 +51,4 @@ Test data lives under `testdata/src/...` --- ## Contributing -PRs welcome. Let's make Go code cleaner, one `err` at a time. +PRs are welcome. Let's make Go code cleaner, one `err` at a time.