jcmturner / gokrb5

Pure Go Kerberos library for clients and services
Apache License 2.0
723 stars 245 forks source link

Possible Bug in Master with os.ReadFile #472

Closed jainsamyak closed 2 years ago

jainsamyak commented 2 years ago

Hello, We noticed an issue with this library where due to a recent commit, the builds started breaking. It seems that the function trying to be used (io.ReadFile) does not exist in the package at all. We noticed this issue as our project relies on Sarama, which is internally using this library for Golang. Kindly help provide a resolution. Details: PR: https://github.com/jcmturner/gokrb5/pull/463 Commit: ce611a4fb5015653f67f163ec8ccfb162035eded Precise line references:

Note: This seems to be an issue specific to the master branch, as when we switched to the release version v8.4.2, everything went back to normal.

Thanks & Regards.

Screenshots for Ref:

image (9) image (10)
marcoantoniobferreira commented 2 years ago

Hey @jainsamyak! I'm having the same issue, but I didn't get it how to switch branchs, because I'm using Sarama, and they have gokrb as dependency. Even when i tried to upgrade Sarama to the latest version v1.34.1, the gokrb was also updated automatically to v8.4.2, but the issue goes on. Could you provide i little more detailed feedback on how you fixed it? Thank you!

Screen Shot 2022-07-12 at 13 39 16
jainsamyak commented 2 years ago

Hi @marcoantoniobferreira , I simply added a dependency to the release version of gokrb5 in our glide.yaml file, try and set a manual dependency for the library to v8.4.2

marcoantoniobferreira commented 2 years ago

I see! Thank you @jainsamyak!

jcmturner commented 2 years ago

I believe that os.ReadFile was introduced in Go 1.16 (https://go.dev/doc/go1.16) as part of deprecating the io/ioutil. Are you using an older version of Go? The master branch will be the basis of a future released version so I recommend updating the version of Go you are using if this is the case. As this does not seem to be an issue with the gokrb5 library I'll be closing this issue. Thanks.

marcoantoniobferreira commented 2 years ago

Yes @jcmturner, i am using Go 1.13. I will update to 1.16 and see if works. Thank you!