Ah, this is because your file pointer is already at the end of the file, and call to os.Read (or similar) does not automatically resets it for you. Not like it would happen in Ruby et al. Check this out: https://gist.github.com/kwilczynski/5984867