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:
# REVISION provides a version number for this image and all it's bundled # artifacts. It should start at zero for each LATEST_ETCD_VERSION and increment # for each revision of this image at that etcd version. <del> REVISION?=0 </del> <ins> REVISION?=1 </ins> # IMAGE_TAG Uniquely identifies k8s.gcr.io/etcd docker image with a tag of the form "<etcd-version>-<revision>". IMAGE_TAG=$(LATEST_ETCD_VERSION)-$(REVISION)

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

// Read parses the version.txt file and returns it's contents. func (v *VersionFile) Read() (*EtcdVersionPair, error) { <del> data, err := ioutil.ReadFile(v.path) </del> <ins> data, err := os.ReadFile(v.path) </ins> if err != nil { return nil, fmt.Errorf("failed to read version file %s: %v", v.path, err) }

// We do write + rename instead of just write to protect from version.txt // corruption under full disk condition. // See https://github.com/kubernetes/kubernetes/issues/98989. <del> err = ioutil.WriteFile(v.nextPath(), []byte(vp.String()), 0666) </del> <ins> err = os.WriteFile(v.nextPath(), []byte(vp.String()), 0666) </ins> if err != nil { return fmt.Errorf("failed to write new version file %s: %v", v.nextPath(), err) }

package main import ( <del> "io/ioutil" </del> "os" "path/filepath" "testing"

} func newTestPath(t *testing.T) string { <del> path, err := ioutil.TempDir("", "etcd-migrate-test-") </del> <ins> path, err := os.MkdirTemp("", "etcd-migrate-test-") </ins> if err != nil { t.Fatalf("Failed to create tmp dir for test: %v", err) }

"encoding/pem" "flag" "fmt" <del> "io/ioutil" </del> "math/big" "net" "os"

} os.MkdirAll(filepath.Dir(certFileName), os.FileMode(0777)) <del> err = ioutil.WriteFile(certFileName, certPem, os.FileMode(0777)) </del> <ins> err = os.WriteFile(certFileName, certPem, os.FileMode(0777)) </ins> if err != nil { return err } os.MkdirAll(filepath.Dir(keyFileName), os.FileMode(0777)) <del> err = ioutil.WriteFile(keyFileName, keyPem, os.FileMode(0777)) </del> <ins> err = os.WriteFile(keyFileName, keyPem, os.FileMode(0777)) </ins> if err != nil { return err }