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

tour: Empty comment line needed to get code to run #482

Open
z-bowen opened this issue May 16, 2018 · 2 comments
Open

tour: Empty comment line needed to get code to run #482

z-bowen opened this issue May 16, 2018 · 2 comments

Comments

@z-bowen
Copy link

z-bowen commented May 16, 2018

The code in this exercise fails to run as initially presented. However, by adding a blank comment line at the beginning of the main function, the problem is fixed.

I'm running Chrome v66 on a MacBook with High Sierra.

Working
working

Not Working
not_working

Context: https://tour.golang.org/moretypes/13

Change the title above to describe your issue and add your feedback here, including code if necessary

@bgadrian
Copy link
Contributor

bgadrian commented Jun 7, 2018

I can confirm, probably some unwanted unicode characters were added

The page event looks broken (see white box).

screnshot

The content of the page code (without pressing/clicking) is
curl 'https://tour.golang.org/compile' -H 'cookie: ' -H 'origin: https://tour.golang.org' -H 'accept-encoding: gzip, deflate, br' -H 'accept-language: en-GB,en;q=0.9,en-US;q=0.8,ro;q=0.7' -H 'x-requested-with: XMLHttpRequest' -H 'pragma: no-cache' -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36' -H 'content-type: application/x-www-form-urlencoded; charset=UTF-8' -H 'accept: application/json, text/javascript, */*; q=0.01' -H 'cache-control: no-cache' -H 'authority: tour.golang.org' -H 'referer: https://tour.golang.org/moretypes/13' -H 'dnt: 1' --data 'version=2&body=package+main%0A%0Aimport+%22fmt%22%0A%0Afunc+main()+%7B%0A%09a+%3A%3D+make(%5B%5Dint%2C+5)%0A%09printSlice(%22a%22%2C+a)%0A%0A%09b+%3A%3D+make(%5B%5Dint%2C+0%2C+5)%0A%09printSlice(%22b%22%2C+b)%0A%0A%09c+%3A%3D+b%5B%3A2%5D%0A%09printSlice(%22c%22%2C+c)%0A%0A%09d+%3A%3D+c%5B2%3A5%5D%0A%09printSlice(%22d%22%2C+d)%0A%7D%0A%0Afunc+printSlice(s+string%2C+x+%5B%5Dint)+%7B%0A%09fmt.Printf(%22%25s+len%3D%25d+cap%3D%25d+%25v%5Cn%22%2C%0A%09%09s%2C+len(x)%2C+cap(x)%2C+x)%0A%7D%0A' --compressed

@bgadrian
Copy link
Contributor

After some more investigations I think it may be related to #505 and #512

Some invisible runes seems link all these issues (errors and UI).

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

No branches or pull requests

2 participants