I wrote some code in Golang that seems fine to me but I found this syntax error, I think it have something to do with Go attaching semicolons at the end of lines. Can somebody please explain what is wrong with this code?
Type of member is fb.Result (a.k.a. map[string]interface{})
func worker() {
defer wg.Done()
for i := range input {
member, err := fb.Get("/1", fb.Params{
"fields": "first_name",
"access_token": "valid_token",
}); err == nil {
output <- fmt.Sprint(member["first_name"])
}else{
fmt.Println(err)
continue
}
}
}