style: shorten verbose local variable `interfaceValues` across `field` package
- Dominant language
- Go
- Stars
- 108
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
## Summary
Several methods in the `field` package use a local variable named `interfaceValues` to convert typed slices to `[]any`. This name is verbose for a ~5-line scope. Go convention is to use shorter names for shorter scopes.
## Locations
| File | Line | Method |
|---|---|---|
| `field/bytes.go` | 66–70 | `In`, `NotIn` |
| `field/number.go` | 116–120, 124–129 | `In`, `NotIn` |
| `field/string.go` | 136–140, 144–149 | `In`, `NotIn` |
| `field/time.go` | 116–120, 124–129 | `In`, `NotIn` |
## Current
```go
interfaceValues := make([]any, len(values))
for i, v := range values {
interfaceValues[i] = v
}
```
## Proposed
```go
vals := make([]any, len(values))
for i, v := range values {
vals[i] = v
}
```
## References
- [Go Code Review Comments — Variable Names](https://github.com/golang/go/wiki/CodeReviewComments#variable-names)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.