Reduce complexicty
We have quite some complexity in our code. We should remove it or at least refactor it and use some better abstractions.
-
remove nolint:funlen -
make linter gocognit more restrictive f.e. complexity 20 -
remove nolint:gocognit. special for the collector -
Use t.SetEnv() to setup env vars in test https://medium.com/@kandros/setting-env-in-a-go-test-1aed13efb282