Content-Length: 297113 | pFad | https://github.com/golang/go/issues/70910

FA x/pkgsite: code example format request returns HTTP 405 method not allowed error · Issue #70910 · golang/go · GitHub
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: code example format request returns HTTP 405 method not allowed error #70910

Closed
meblum opened this issue Dec 18, 2024 · 9 comments
Closed
Assignees
Labels
help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite
Milestone

Comments

@meblum
Copy link

meblum commented Dec 18, 2024

What is the URL of the page with the issue?

https://pkg.go.dev/net/url#Values.Encode (click the "Format" button)

What is your user agent?

Chrome on Windows

Screenshot

image

What did you do?

Clicked the Format button for the code example

What did you expect to see?

Formatted code

What did you see instead?

An HTTP 405 error response

@gabyhelp
Copy link

Related Issues

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

@gopherbot gopherbot added this to the Unreleased milestone Dec 18, 2024
@ansaba
Copy link

ansaba commented Jan 28, 2025

The example code is formatted in playground without any error. Needs Investigation for pkgsite.

@ansaba ansaba added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. help wanted labels Jan 28, 2025
@ibeloyar
Copy link

ibeloyar commented Jan 28, 2025

Good afternoon @ansaba. Does the GoPlayground environment allow you to work with URL?

@ansaba
Copy link

ansaba commented Jan 29, 2025

@ibeloyar , I think you mean does Playground environment allows to work with URL package?
Yes, it does. You can try URL package at https://go.dev/play/p/vMqS51Dn0Cz

@AndrewGMorgan
Copy link
Contributor

Found this bug when I ran into the same issue with a different example:

https://pkg.go.dev/strings#example-Builder

The error I see displayed in red is the same (running from a Chromebook):

SyntaxError: Unexpected token 'M', "Method Not Allowed " is not valid JSON

I tried random other examples and can't find any that format on pkg.go.dev at present.

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/645577 mentions this issue: internal/frontend: register POST paths for playground fmt and compile

@AndrewGMorgan
Copy link
Contributor

Is there an ETA for when the fix for this will be active on the site?

@jba
Copy link
Contributor

jba commented Feb 18, 2025

We just deployed. I see valid output when I click Run on https://pkg.go.dev/strings#example-Builder.

@AndrewGMorgan
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite
Projects
None yet
Development

No branches or pull requests

7 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/golang/go/issues/70910

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy