code: func (h *Handler) Rotate() error {
  	var err error
  
  	if h.file != nil {
  		defer func(f *os.File) {
  			f.Close()
  		}(h.file)
  	}
  
  	h.file, err = os.OpenFile(h.config.FilePath, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0664)
  	if err != nil {
  		return err
  	}
  	h.mu.Lock()
  	defer h.mu.Unlock()
  	h.logger.Out = h.file
  	return nil
  }
docs: // Rotate closes and reopens the log file to allow for rotation by an external source.