-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(sumologicexporter): use golang.org/x/exp/slices for sorting fields #519
refactor(sumologicexporter): use golang.org/x/exp/slices for sorting fields #519
Conversation
I'm not sure if I'm reading this right, but from golangci/golangci-lint#2649 it sounds like the linter should work if we explicitly set go version to 1.18 in the config? The issue description claims that they automatically disable linters which can't handle generics for go 1.18. @pmalek-sumo ? |
96c768b
to
c32b5ff
Compare
It seems that
are the ones that cause problems. I've disables specifically those for now in config and linter should be happy now. @swiatekm-sumo |
c32b5ff
to
9686a44
Compare
This PR uses generic slice sorting algorithm and saves yet another allocation in
fields.string()
.Related article: https://eli.thegreenplace.net/2022/faster-sorting-with-go-generics/
EDIT: the linter fails because we don't have full generics support in golangci-lint just yet: golangci/golangci-lint#2649