Skip to content

Commit d655e18

Browse files
committed
format readme
1 parent 9df7535 commit d655e18

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Readme.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ Named errors used in defers are not reported. If you also want to report them se
99

1010
# Why are named returns error prone?
1111

12-
1. **Shadowing of Variables**
13-
If you have a named return variable that is also used as a local variable within the function, it can lead to shadowing issues. This occurs when the named return variable is unintentionally shadowed by a local variable with the same name, leading to unexpected behavior.
12+
1. **Shadowing of Variables**
13+
If you have a named return variable that is also used as a local variable within the function, it can lead to shadowing issues. This occurs when the named return variable is unintentionally shadowed by a local variable with the same name, leading to unexpected behavior.
1414

15-
2. **Accidental Changes**
15+
2. **Accidental Changes**
1616
Developers might inadvertently modify the value of a named return variable within the function, thinking it only affects the local variable and not the actual return value.
1717

18-
3. **Readability Issues**
18+
3. **Readability Issues**
1919
While named returns can improve readability for method signatures, they can also make the code harder to understand if misused. It may be unclear whether a variable is a local variable or a return variable, especially in larger functions.
2020

21-
4. **Unused Variables**
22-
Named returns often result in variables being declared in the function signature that are not used within the function body. This can lead to confusion and may make the code less maintainable.
21+
4. **Unused Variables**
22+
Named returns often result in variables being declared in the function signature that are not used within the function body. This can lead to confusion and may make the code less maintainable.

0 commit comments

Comments
 (0)