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

Upgrade to Go 1.18 #342

Merged
merged 4 commits into from
Jul 22, 2022
Merged

Upgrade to Go 1.18 #342

merged 4 commits into from
Jul 22, 2022

Conversation

epk
Copy link
Contributor

@epk epk commented Jul 22, 2022

Signed-off-by: Aditya Sharma git@adi.run

Description of your changes

  • Upgrades Go to 1.18
  • Fixes some minor lint errors

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

epk added 4 commits July 21, 2022 21:44
Signed-off-by: Aditya Sharma <git@adi.run>
Signed-off-by: Aditya Sharma <git@adi.run>
Signed-off-by: Aditya Sharma <git@adi.run>
Signed-off-by: Aditya Sharma <git@adi.run>
Copy link
Member

@muvaf muvaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @epk !

@@ -38,15 +38,15 @@ func (e errNotFound) IsNotFound() bool {
// index was out of bounds in an array.
func IsNotFound(err error) bool {
cause := errors.Cause(err)
_, ok := cause.(interface {
_, ok := cause.(interface { //nolint: errorlint // Skip errorlint for interface type
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there no way to use any here as well?

Copy link
Contributor Author

@epk epk Jul 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any is only explicitly interoperable with interface{}, here it is an interface with function definitions

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if there is a plan to make it available for use in these cases as well, or are we stuck with interface{} for the foreseeable future?

return pkg, err
}
if err == io.EOF {
if errors.Is(err, io.EOF) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checked that errors.Is returns the same answer for == io.EOF by running the tests with coverage and seeing it go into this statement.

@muvaf muvaf merged commit 9ea84ae into crossplane:master Jul 22, 2022
chlunde added a commit to chlunde/provider-aws that referenced this pull request Aug 6, 2022
     go mod tidy -compat=1.18 -go=1.18
     cd build/
     git fetch
     git checkout origin/master
     sed -i s,ubuntu-18.04,ubuntu-20.04,g .github/workflows/*
     vim .github/workflows/ci.yml

inspired by crossplane/crossplane-runtime#342

Signed-off-by: Carl Henrik Lunde <chlunde@ifi.uio.no>
@epk epk mentioned this pull request Aug 22, 2022
6 tasks
chlunde added a commit to chlunde/provider-aws that referenced this pull request Aug 25, 2022
     go mod tidy -compat=1.18 -go=1.18
     cd build/
     git fetch
     git checkout origin/master
     sed -i s,ubuntu-18.04,ubuntu-20.04,g .github/workflows/*
     vim .github/workflows/ci.yml

inspired by crossplane/crossplane-runtime#342

Signed-off-by: Carl Henrik Lunde <chlunde@ifi.uio.no>
emelieakerstrom-sb1 pushed a commit to sparebank1utvikling/provider-aws that referenced this pull request Sep 28, 2022
     go mod tidy -compat=1.18 -go=1.18
     cd build/
     git fetch
     git checkout origin/master
     sed -i s,ubuntu-18.04,ubuntu-20.04,g .github/workflows/*
     vim .github/workflows/ci.yml

inspired by crossplane/crossplane-runtime#342

Signed-off-by: Carl Henrik Lunde <chlunde@ifi.uio.no>
chlunde added a commit to chlunde/provider-sql that referenced this pull request Nov 9, 2022
     go mod tidy -compat=1.18 -go=1.18
     cd build/
     git fetch
     git checkout origin/master
     sed -i s,ubuntu-18.04,ubuntu-20.04,g .github/workflows/*
     vim .github/workflows/ci.yml

inspired by crossplane/crossplane-runtime#342

Signed-off-by: Carl Henrik Lunde <chlunde@ifi.uio.no>
chlunde added a commit to chlunde/provider-sql that referenced this pull request Nov 11, 2022
     go mod tidy -compat=1.18 -go=1.18
     cd build/
     git fetch
     git checkout origin/master
     sed -i s,ubuntu-18.04,ubuntu-20.04,g .github/workflows/*
     vim .github/workflows/ci.yml

inspired by crossplane/crossplane-runtime#342

Signed-off-by: Carl Henrik Lunde <chlunde@ifi.uio.no>
Duologic pushed a commit to crossplane-contrib/provider-sql that referenced this pull request Nov 18, 2022
* Upgrade to Go 1.18

     go mod tidy -compat=1.18 -go=1.18
     cd build/
     git fetch
     git checkout origin/master
     sed -i s,ubuntu-18.04,ubuntu-20.04,g .github/workflows/*
     vim .github/workflows/ci.yml

inspired by crossplane/crossplane-runtime#342

* gofmt -s -l -w ./*/

Signed-off-by: Carl Henrik Lunde <chlunde@ifi.uio.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants