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

x/pkgsite: Excluding private packages from external site lookups #55106

Open
Tracked by #39827
mikesep opened this issue Sep 16, 2022 · 0 comments
Open
Tracked by #39827

x/pkgsite: Excluding private packages from external site lookups #55106

mikesep opened this issue Sep 16, 2022 · 0 comments

Comments

@mikesep
Copy link

mikesep commented Sep 16, 2022

Running golang.org/x/pkgsite/cmd/pkgsite locally to see documentation for a package I'm working on has been a generally great experience, but I've noticed that pkgsite is trying to fetch information from https://deps.dev for my private packages, and I'd like to avoid those requests.

For example, if I make go.mod

module example.com/demomodule

go 1.19

and demo.go

package demomodule

func ThisIsAFunction() {}

When I run golang.org/x/pkgsite/cmd/pkgsite from that directory, I can see rendered docs when I go to http://localhost:8080/example.com/demomodule in my browser, but I also see failed requests to deps.dev:

$ pkgsite
2022/09/16 09:17:27 Info: Listening on addr http://localhost:8080
2022/09/16 09:17:33 Info: FetchDataSource: fetching example.com/demomodule@latest
2022/09/16 09:17:33 Info: FetchDataSource: fetched example.com/demomodule@latest in 4.04575ms with error <nil>
2022/09/16 09:17:33 Warning: fetching url from deps.dev: Get "https://deps.dev/_/s/go/p/example.com%2Fdemomodule/v/v0.0.0/exists": context deadline exceeded

#47463 suggests other external sources might be called in the future, so would it make sense to have a configurable pattern (similar to how GOPRIVATE/GONOPROXY/GONOSUMDB work?) to exclude certain packages from being looked up in external resources?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants