I receive this error when I try to run this code: syntax error: unexpected cornerFinder, expecting (
case "-v2":
func cornerFinder(censusData []CensusGroup) {
if len(censusData) <= 10000{
for i := 0; i <= 10000; i++ {
if (censusData.latitude > maxLat){
maxLat = censusData.latitude
}
if (censusData.latitude < minLat){
minLat = censusData.latitude
}
if (censusData.longitude > maxLong){
maxLong = censusData.longitude
}
if (censusData.longitude < minLong){
minLong = censusData.longitude
}
}
}
mid := len(data)/2
done := make(chan bool)
go func() {
cornerFinder(censusData[:mid])
done<- true
} ()
cornerFinder(censusData[mid:len(censusData)])
<-done
return
}
cornerFinder(censusData)
Its giving this error on the second line of the code:
func cornerFinder(censusData []CensusGroup) {
I think it something trivial that I am missing. Been stuck on it for a couple of hours. Help would be appreciated