Skip to content
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

golangci-lint reports: times.Total is deprecated #5988

Closed
iblancasa opened this issue Aug 29, 2022 · 1 comment
Closed

golangci-lint reports: times.Total is deprecated #5988

iblancasa opened this issue Aug 29, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@iblancasa
Copy link
Contributor

Describe the bug
The usage of the cpu.Total function was deprecated in shirou/gopsutil#1325

Steps to reproduce
When running make lint, the this error is produced:

$ make lint
golangci-lint run
service/internal/telemetry/process_telemetry.go:162:9: SA1019: times.Total is deprecated: Total returns the total number of seconds in a CPUTimesStat Please do not use this internal function. (staticcheck)
	return times.Total()
	       ^
make: *** [Makefile.Common:41: lint] Error 1

What version did you use?
Version: master. Commit: 1eda0c4e4f6fbd90966359e12b226db01a845223.

@iblancasa iblancasa added the bug Something isn't working label Aug 29, 2022
iblancasa added a commit to iblancasa/opentelemetry-collector that referenced this issue Aug 29, 2022
Signed-off-by: Israel Blancas <iblancasa@gmail.com>
bogdandrutu pushed a commit that referenced this issue Sep 7, 2022
* Fix lint error #5988

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

* Apply changes requested in CR

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

* Apply changes requested in CR

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

Signed-off-by: Israel Blancas <iblancasa@gmail.com>
@bogdandrutu
Copy link
Member

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants