1
0
mirror of https://github.com/mgechev/revive.git synced 2025-10-30 23:37:49 +02:00

doc: add before/after examples to confusing-results description (#1503)

This commit is contained in:
chavacava
2025-08-31 10:19:44 +02:00
committed by GitHub
parent 89d77d3be8
commit b89a95979b

View File

@@ -257,6 +257,22 @@ _Configuration_: N/A
_Description_: Function or methods that return multiple, no named, values of the same type could induce error.
### Examples
Before (violation):
```go
// getPos yields the geographical position of this tag.
func (t tag) getPos() (float32, float32)
```
After (fixed):
```go
// getPos yields the geographical position of this tag.
func (t tag) getPos() (longitude float32, latitude float32)
```
_Configuration_: N/A
## constant-logical-expr