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: struct literal not explained #412

Open
gregbaker opened this issue Feb 14, 2018 · 1 comment · May be fixed by golang/website#69
Open

tour: struct literal not explained #412

gregbaker opened this issue Feb 14, 2018 · 1 comment · May be fixed by golang/website#69
Labels
help wanted NeedsFix The path to resolution is known, but the work has not been done.

Comments

@gregbaker
Copy link

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

The struct literal syntax isn't actually explained in the tutorial text. The "Vertex{1, 2}" kind of comes out of nowhere. Some text like this would be helpful:

Struct literals are the name of the struct with values in braces, in the order they are defined in the struct. In this example, Vertex{1, 2} creates a Vertex with x=1 and y=2.

@ALTree ALTree added NeedsFix The path to resolution is known, but the work has not been done. help wanted labels Jul 4, 2018
@bgadrian
Copy link
Contributor

I will try to submit a fix

sagar23sj added a commit to sagar23sj/website that referenced this issue Jun 16, 2021
Existing description does not give a clear idea about the syntax of struct literals.
New changes added small description and example breakdown to explain struct literals.

Fixes: golang/tour#412
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
3 participants