What's wrong with this code var type Student struct { name string university string }
- User
What's wrong with this code var type Student struct { name string university string
}
- Assistant
The syntax itself for defining a struct in Go is correct. However, if this line of code is provided without context or additional code to make use of the
Studentstruct, it is difficult to point out what is specifically wrong with it.Assuming this is part of a larger Go program, here are a few common issues that may arise with this code, even though they aren't syntactically incorrect: