struct assignment golan code example
Example: init struct go
type Student struct {
Name string
Age int
}
var a Student // a == Student{"", 0}
a.Name = "Alice" // a == Student{"Alice", 0}
type Student struct {
Name string
Age int
}
var a Student // a == Student{"", 0}
a.Name = "Alice" // a == Student{"Alice", 0}