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]
|
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()
|
es.checkAndPanic()
|
||||||
|
|
||||||
for _, e := range *es {
|
for _, e := range es {
|
||||||
if f(&e) {
|
if f(&e) {
|
||||||
return &e, nil
|
return &e, nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user