// Terminates access to an HDF5 file. func (f *File) Close() error { var err error = nil if f.id > 0 { err = togo_err(C.H5Fclose(f.id)) f.id = 0 } return err }
// Terminates access to an HDF5 file. func (f *File) Close() error { if f.id == 0 { return nil } err := h5err(C.H5Fclose(f.id)) f.id = 0 return err }
// Close closes the file. func (f *File) Close() error { if err := C.H5Fclose(f.fid); err != 0 { return errors.New("failed to close the file") } return nil }