refactor(ish): don't use reference in method that doesn't modify
This commit is contained in:
1 parent
ccae8d42fd
commit
9800c43bfa
1 file changed
+2
-2
+2
-2
@@ -216,10 +216,10 @@ func (es Entries) lookup(hostname string) Entries {
|
||||
return es[i : i+j]
|
||||
}
|
||||
|
||||
func (es *Entries) first(f func(*Entry) bool) (*Entry, error) {
|
||||
func (es Entries) first(f func(*Entry) bool) (*Entry, error) {
|
||||
es.checkAndPanic()
|
||||
|
||||
for _, e := range *es {
|
||||
for _, e := range es {
|
||||
if f(&e) {
|
||||
return &e, nil
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user