What does unexpected E0F mean?


(Cherolyn Lexvold) #1

I’m getting this error message


(Norbert Melzer) #2

EOF is short for end of file, so it means that whatever you are doing gets to the end of the file before it would expect it.

But not can only be told if you show some code, and possibly the file you are trying to read.


(Charles Banning) #3

Pretty cryptic question. What’s the context / code producing the error message.

I’m guessing you processing an encoded stream using an io.Reader. If the decoding reaches an io.EOF condition without the decoding completed you’ll get that error. See https://play.golang.org/p/m9lOV0S-2po.


(Jay Ts) #4

Hi Cherolyn,

I agree with Charles - please post your program, as you’ve done in the past. Then we can help you better.

By the way, it’s EOF (with an oh, not a zero). End Of File.


(Cherolyn Lexvold) #5

Thanks guys. Unfortunately I deleted the code :weary: Sorry. I guess I’ll have to wait til the next time it occurs