-
Notifications
You must be signed in to change notification settings - Fork 450
refactor: move from io/ioutil to io and os packages #5999
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
Conversation
The io/ioutil package has been deprecated as of Go 1.16, see https://golang.org/doc/go1.16#ioutil. This commit replaces the existing io/ioutil functions with their new definitions in io and os packages. Signed-off-by: Eng Zer Jun <[email protected]>
|
CDS Report build-all-cds#16745.0 ✘
|
yesnault
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# github.com/ovh/cds/tools/smtpmock
./client.go:49:14: undefined: io.ReadAll
| @@ -1,5 +1,5 @@ | |||
| # build stage | |||
| FROM golang:1.15 AS builder | |||
| FROM golang:1.17 AS builder | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# github.com/ovh/cds/tools/smtpmock ./client.go:49:14: undefined: io.ReadAll
@yesnault This should be fixed now. The SMTPMock Dockerfile is using Go 1.15 instead of 1.17.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Juneezee yes, thank you. Can you re-run go mod tidy in tools/smtpmock please? seems that go.mod is no up to date
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yesnault Done. Please take a look again. Thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Juneezee It's now ok, thank you!
Signed-off-by: Eng Zer Jun <[email protected]>
The
io/ioutilpackage has been deprecated in Go 1.16 (See https://golang.org/doc/go1.16#ioutil). Since CDS has been upgraded to Go 1.17 (#5973), this PR replaces the existingio/ioutilfunctions with their new definitions inioandospackages.