gop
gop copied to clipboard
The compiler reportes a wrong line number
When I run codes below on the Go+ Playground,
type Person struct {
Name string
Age int
}
p := Person{
Name: "bar",
Age: 30
}
println(p.Name)
got a compile error:
GenGoPkg .
main.gop:6:2: expected declaration (and 1 more errors)
Infact, the real error line is 8
(missed ,
after Age: 30
), not 6
.
There are more errors that are hidden. So the real problem is how to show all errors.