package main
import “fmt”
type Hospital struct {
name1 string
phone int
}
type Doctors struct {
Hospital
id int
name string
patients []string
}
func main() {
doc := Doctors{}
var
doc.name1 = “Govt”
doc.phone = 123456
doc.id = 11
doc.name = “tinq”
doc.patients :=[]string{“Jone”,“David”}
How to assingn a value for patients field?
Getting this error:
./prog.go:24:2: non-name doc.patients on left side of :=