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

Add support for GOPROXY env var #34

Merged
merged 1 commit into from
Jul 9, 2024
Merged

Add support for GOPROXY env var #34

merged 1 commit into from
Jul 9, 2024

Conversation

icholy
Copy link
Owner

@icholy icholy commented Jul 8, 2024

Fixes: #35

@icholy
Copy link
Owner Author

icholy commented Jul 8, 2024

@sanyatuning can you test this branch?

@sanyatuning
Copy link

Hi!
Thank you for the fast response!
Sadly it is not working yet.
I got errors like this

github.com/DATA-DOG/go-sqlmock: failed: proxy: 404 Not Found

I debugged it a little and found the proxy server does respond with an empty body on 404 errors.
So this line cases the problem, without body check it is working, at least for my test case.

Note: (just FYI) this env may have multiple URL-s like GOPROXY=https://corp.example.com,https://proxy.golang.org - docs
We only use one so I am happy with your solution.

@icholy
Copy link
Owner Author

icholy commented Jul 9, 2024

I'll take another crack at it after work today.

@icholy
Copy link
Owner Author

icholy commented Jul 9, 2024

@sanyatuning I think it should work now

@icholy
Copy link
Owner Author

icholy commented Jul 9, 2024

I've tested against https://goproxy.cn and it's working.

@icholy icholy merged commit f6e80af into master Jul 9, 2024
1 check passed
@icholy
Copy link
Owner Author

icholy commented Jul 9, 2024

Tagged as v0.13.0

@icholy icholy deleted the goproxy-env branch July 9, 2024 21:17
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.

Support GOPROXY env var
2 participants