code: func CheckEOF(in IndexInput) error {
  	if in.FilePointer() != in.Length() {
  		return errors.New(fmt.Sprintf(
  			"did not read all bytes from file: read %v vs size %v (resources: %v)",
  			in.FilePointer(), in.Length(), in))
  	}
  	return nil
  }
docs: /* Checks that the stream is positioned at the end, and returns error if it is not. */