8000 x/pkgsite: panic serving from directory with space in name · Issue #73534 · golang/go · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

x/pkgsite: panic serving from directory with space in name #73534

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

Open
malikwirin opened this issue Apr 29, 2025 · 3 comments
Open

x/pkgsite: panic serving from directory with space in name #73534

malikwirin opened this issue Apr 29, 2025 · 3 comments
Labels
BugReport Issues describing a possible bug in the Go implementation. NeedsFix The path to resolution is known, but the work has not been done. pkgsite
Milestone

Comments

@malikwirin
Copy link

What is the URL of the page with the issue?

https://pkg.go.dev/golang.org/x/pkgsite/cmd/pkgsite

What is your user agent?

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36

What did you do?

  • Following the book "Learn Go with tests" currently at section integers.
  • trying to follow the book and use pkgsite
  • get pkgsite into my shell session with the following command since I am on NixOS nix shell github:NixOS/nixpkgs/master#pkgsite
  • following the book by executing pkgsite -open .
  • getting an error message

What did you expect to see?

I expected to see no error message and beeing able to see the documentation of my code at http://localhost:8080

What did you see instead?

2025/04/29 15:15:16 Info: go/packages.Load(["all"]) loaded 67 packages from . in 80.142925ms
2025/04/29 15:15:16 Info: go/packages.Load(std) loaded 305 packages from /nix/store/dp32ygzj76lbjqfmh3xh5i89xm76a8m6-go-1.23.8/share/go in 232.837637ms
2025/04/29 15:15:16 Info: FetchDataSource: fetching learnGoWithTests@v0.0.0
2025/04/29 15:15:16 Info: FetchDataSource: fetching std@latest
2025/04/29 15:15:16 Info: FetchDataSource: fetched learnGoWithTests@v0.0.0 using *fetch.goPackagesModuleGetter in 1.629349ms with error <nil>
panic: parsing "/home/malik/Studium/Selbststudium/Go/Learn Go with tests/": at offset 0: invalid method "/home/malik/Studium/Selbststudium/Go/Learn"

goroutine 1 [running]:
net/http.(*ServeMux).register(...)
	net/http/server.go:2872
net/http.(*ServeMux).Handle(0xbc2d00?, {0xc000896b80?, 0xc00086de60?}, {0x1243680?, 0xc00038fe00?})
	net/http/server.go:2835 +0x4d
golang.org/x/pkgsite/internal/frontend.(*Server).InstallFS(0xc00086de60, {0xc0004a4080, 0x38}, {0x1244e60?, 0xc000254000?})
	golang.org/x/pkgsite/internal/frontend/server.go:310 +0x165
golang.org/x/pkgsite/cmd/internal/pkgsite.newServer({0xc0005ac740, 0x3, 0xbce7a0?}, {0xc000496c60, 0x1, 0x1}, 0x124b180?, 0x0, {0xc4dd6f, 0x6})
	golang.org/x/pkgsite/cmd/internal/pkgsite/server.go:304 +0x4a5
golang.org/x/pkgsite/cmd/internal/pkgsite.BuildServer({0x124b180, 0x1752ba0}, {{0xc000338f10, 0x1, 0x1}, 0x0, 0x0, {0x0, 0x0}, 0x1, ...})
	golang.org/x/pkgsite/cmd/internal/pkgsite/server.go:116 +0x505
main.main()
	golang.org/x/pkgsite/cmd/pkgsite/main.go:125 +0x4c6

I am asking the maintainer of the nix package @phanirithvij if they can tell us if this has to do with the Nix environment.

@gopherbot gopherbot added this to the Unreleased milestone Apr 29, 2025
@malikwirin
Copy link
Author

I can confirm that I dont get this error on directories without blank space

@malikwirin malikwirin changed the title x/pkgsite: Seems not to work on directories containing blank characters x/pkgsite: Bug Seems not to work on directories containing blank characters Apr 29, 2025
@malikwirin malikwirin changed the title x/pkgsite: Bug Seems not to work on directories containing blank characters x/pkgsite: [Bug] Seems not to work on directories containing blank characters Apr 29, 2025
@gabyhelp gabyhelp added the BugReport Issues describing a possible bug in the Go implementation. label Apr 29, 2025
@seankhliao seankhliao changed the title x/pkgsite: [Bug] Seems not to work on directories containing blank characters x/pkgsite: panic serving from directory with space in name Apr 29, 2025
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/668875 mentions this issue: internal/frontend: handle file paths with spaces

@seankhliao seankhliao added the NeedsFix The path to resolution is known, but the work has not been done. label Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BugReport Issues describing a possible bug in the Go implementation. NeedsFix The path to resolution is known, but the work has not been done. pkgsite
Projects
None yet
Development

No branches or pull requests

4 participants
0