FairwindsOps / pluto

A cli tool to help discover deprecated apiVersions in Kubernetes
https://fairwinds.com
Apache License 2.0
2.14k stars 124 forks source link

Go 1.16 Deprecates IOUtil; lint fails build #438

Closed freeone3000 closed 1 year ago

freeone3000 commented 1 year ago

What happened?

Building from master using go 1.19.5 (released October 2022) fails lint with the error in the "reproduction" section.

What did you expect to happen?

Build from master should succeed.

How can we reproduce this?

~/IdeaProjects/pluto/ git:(master) $ make
golangci-lint run
cmd/root.go:34:2: SA1019: "io/ioutil" has been deprecated since Go 1.16: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details. (staticcheck)
    "io/ioutil"
    ^
pkg/finder/finder.go:33:2: SA1019: "io/ioutil" has been deprecated since Go 1.16: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details. (staticcheck)
    "io/ioutil"
    ^
make: *** [lint] Error 1
~/IdeaProjects/pluto/ git:(master) $ go version  
go version go1.19.5 darwin/arm64

Version

1.19.5

Search

Code of Conduct

Additional context

will be submitting a potential fix for this shortly; it seems an easy fix