Change:
Please see We have a lot of references to which we need to migrate to newer package(s) mentioned in the url above: * We also need some verify scripts to ensure we don't add back this package /area code-organization
There are no sig labels on this issue. Please add an appropriate label by using one of the following commands: - Please see the for a listing of the SIGs, working groups, and committees available. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the label and provide further guidance. The label can be by org members by writing in a comment. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
/sig architecture (seems like this cuts across everything!)
The package is deprecated but is not planned for removal. Switching is fine, but this is not urgent
mind if I take a look at this ? /assign
Ack !
For the script to verify the and ensure we don't add this back again, can I modify the existing toolchain to add a new field with similar behavior support as that of ?
ioutil is extremely widely used, and is not actually a problem to continue using... make sure the importverifier doesn't complain if we depend on it transitively via a vendored dependency
Sure. I will keep that in mind. I will enable this as a soft warning behavior if that is all right with everyone so that we can warn them but not fail the check right-away. Once we decide to enforce it, we can switch the config to fail the checks.
I'm skeptical that this is worth the effort to warn/sweep existing code
ack on the warn/verify we can deal with that later (i'll check on possibilities). let's focus this issue to just the bulk replace
Ack. Thanks
Most of the methods in ioutil have relatively simple implementations that seem stable, doubly so if it's deprecated If go isn't planning to remove this package any time soon I'm also not sure it's worth the cost of forcing library consumers to use go1.16+?
Issues go stale after 90d of inactivity. Mark the issue as fresh with . Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with . Send feedback to sig-contributor-experience at . /lifecycle stale
/remove-lifecycle stale /priority important-longterm (based on Please feel to correct, if otherwise)
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules: After 90d of inactivity, is applied After 30d of inactivity since was applied, is applied After 30d of inactivity since was applied, the issue is closed You can: Mark this issue or PR as fresh with Mark this issue or PR as rotten with Close this issue or PR with Offer to help out with [Issue Triage][1] Please send feedback to sig-contributor-experience at . /lifecycle stale [1]:
/remove-lifecycle stale /lifecycle frozen
looks like people are still submitting PRs on this topic and they are not getting reviewed. From Go perspective there's no update since the 1.16 announcement (AFAIK). Should we revisit this goal?
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the label and provide further guidance. The label can be by org members by writing in a comment. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
Go compatibility means the deprecated functions will not be removed. I'm not in favor of this goal... I think it's churn with little purpose.
/close
Closing this issue. <detailsIn response to : /close Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details

Discussion:
"bytes" "encoding/base64" "fmt" <del> "io/ioutil" </del> "os" "path/filepath" "reflect"

c.t.Fatalf("Expected encryption provider config to be written to %s, but stat failed with error: %v", p, err) } <del> got, err := ioutil.ReadFile(p) </del> <ins> got, err := os.ReadFile(p) </ins> if err != nil { c.t.Fatalf("Failed to read encryption provider config %s", p) }

import ( "fmt" <del> "io/ioutil" </del> "os" "os/exec" "testing"

} for _, tc := range testCases { t.Run(tc.desc, func(t *testing.T) { <del> f, err := ioutil.TempFile("", "append_or_replace_test") </del> <ins> f, err := os.CreateTemp("", "append_or_replace_test") </ins> if err != nil { t.Fatalf("Failed to create temp file: %v", err) }

if err != nil { t.Fatalf("Failed to run command: %v: %s", err, stderr) } <del> got, err := ioutil.ReadFile(f.Name()) </del> <ins> got, err := os.ReadFile(f.Name()) </ins> if err != nil { t.Fatalf("Failed to read file contents: %v", err) }

import ( "fmt" <del> "io/ioutil" </del> <ins> "os" </ins> "path/filepath" "testing"

} func TestCreateMasterAuditPolicy(t *testing.T) { <del> baseDir, err := ioutil.TempDir("", "configure-helper-test") // cleaned up by c.tearDown() </del> <ins> baseDir, err := os.MkdirTemp("", "configure-helper-test") // cleaned up by c.tearDown() </ins> require.NoError(t, err, "Failed to create temp directory") policyFile := filepath.Join(baseDir, "audit_policy.yaml")

import ( "fmt" "io" <del> "io/ioutil" </del> "os" "os/exec" "path/filepath"

manifestFuncName: funcName, } <del> d, err := ioutil.TempDir("", "configure-helper-test") </del> <ins> d, err := os.MkdirTemp("", "configure-helper-test") </ins> if err != nil { c.t.Fatalf("Failed to create temp directory: %v", err) }

} func (c *ManifestTestCase) mustLoadPodFromManifest() { <del> json, err := ioutil.ReadFile(c.manifestDestination) </del> <ins> json, err := os.ReadFile(c.manifestDestination) </ins> if err != nil { c.t.Fatalf("Failed to read manifest: %s, %v", c.manifestDestination, err) }