cncf-tags / container-device-interface

Apache License 2.0
190 stars 36 forks source link

pkg/cdi: add missing error checks in cache #183

Closed marquiz closed 5 months ago

marquiz commented 5 months ago

Mostly retain the existing behavior of ignoring errors but using _ to make golangci-lint happy.

marquiz commented 5 months ago

I was not completely confident I'm doing the right thing here. Thus draft :) As a general note I think the very common pattern here of omitting error checking is bad design. Either check it or then don't even return an error in the first place.

elezar commented 5 months ago

Syntactically, I think this is fine. I'll defer to @klihub for when we should actually return the errors when refreshing the cache.

marquiz commented 5 months ago

Syntactically, I think this is fine. I'll defer to @klihub

Yeah, no syntax error 😇 ping @klihub

elezar commented 5 months ago

@marquiz this can be closed now, correct?

marquiz commented 5 months ago

We agreed to not break the Cache API (return an error from Configure() even though it's always nil), so I'll close this one