code: func (f *Field) deleteView(name string) error {
  	view := f.viewMap[name]
  	if view == nil {
  		return ErrInvalidView
  	}
  
  	// Close data files before deletion.
  	if err := view.close(); err != nil {
  		return errors.Wrap(err, "closing view")
  	}
  
  	// Delete view directory.
  	if err := os.RemoveAll(view.path); err != nil {
  		return errors.Wrap(err, "deleting directory")
  	}
  
  	delete(f.viewMap, name)
  
  	return nil
  }
docs: // deleteView removes the view from the field.