Syntax error: unexpected XYZ, expecting (


(Sibert) #1

I cannot figure out what causes this fault (newbie):

https://play.golang.org/p/zSzu0O_AemR

./prog.go:43:6: syntax error: unexpected chkformat, expecting (

and 7 other similar error messages.

Any hint?


(Norbert Melzer) #2

There is some } missing in Checkmail.


(Sibert) #3

Yes! One closing bracket did it: https://play.golang.org/p/MTLDQv06H7h

Thank you!


(Johan Dahl) #4

The chk-functions could really return a bool instead of no or yes


(Sibert) #5

Normally I do this, but while testing… :wink: But thanks for the tip.


(Nneha Sachan) #6

Error Resolved for your concern but there are many other multiple error…

https://play.golang.org/p/EiUHQ_XESxT


(Sibert) #7

Yes, but they did not appear until the bracket was added. So I enclosed the “final” code in my previous answer: https://play.golang.org/p/MTLDQv06H7h

Do you find any error in this code?