Skip to content

tour: [Syntax description can be more specific] #1062

Open
golang/website
#225
@Gaya3G

Description

@Gaya3G

Context: https://tour.golang.org/flowcontrol/7

In javascript or Java, below code doesn't harm:

if(true){
  // do something
}
else{
  // do something else
}

But it isn't the same case with Go , I guess. when i hit enter and add else in next line, it gives syntax error. I initially thought it was just indentation but later realized syntax is supposed to be the way as in this sample. Felt specifying the same would be helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions