Closed invidian closed 3 years ago
Would you be able to provide a little more info into the type of the a.containers
value. Is it an interface by any chance?
Would you be able to provide a little more info into the type of the a.containers value. Is it an interface by any chance?
Yes, a.containers
is an container management interface. apiLoadBalancers
type exposes similar functionality but of more specific type.
I see. So this is expected functionality if the method is being called through an interface as the implementation may come from an arbitrary package. In this case here, I would suggest it may make sense to wrap the error being returned from this call as per the criteria:
- Errors returned from another package.
- Errors returned by interface methods. Interfaces may be implemented by a separate package, therefore wrapping the errors here with context may be valuable.
I understand that this may be a little inconvenient as this previously wasn't reported (due to direct method calls not being considered). But in a future release I will add the ability for more fine-grained configuration.
Considering following code:
Right now linter triggers on it, but it seems very counter-intuitive.
Used via golangci-lint version v1.39.0