In the below syntax_1,
array := [...]float64{7.0, 8.5, 9.1}
and syntax_2,
type People interface {
SayHello()
ToString()
}
type Student struct {
Person
university string
course string
}
type Developer struct {
Person
company string
platform string
}
func main(){
alex := Student{Person{"alex", 21, "111-222-XXX"}, "MIT","BS CS"}
john := Developer{Person{"John", 35, "111-222-XXX"}, "Accel North America", "Golang"}
jithesh := Developer{Person{"Jithesh", 33, "111-222-XXX"}, "Accel North America", "Hadoop"}
//An array with People types
peopleArr := [...]People{alex, john,jithesh}
}
1) What does this syntax float64{7.0, 8.5, 9.1}
& People{alex, john,jithesh}
mean? this looks like a paradigm(a way of programming) more than a syntax
2) Can you provide reference to the meaning/purpose of [...]
syntax? I see converting something to an []
type