code: func (p *Pget) Download() error {
  
  	procs := uint(p.Procs)
  
  	filesize := p.FileSize()
  	dirname := p.DirName()
  
  	// create download location
  	if err := os.MkdirAll(dirname, 0755); err != nil {
  		return errors.Wrap(err, "failed to mkdir for download location")
  	}
  
  	// calculate split file size
  	split := filesize / procs
  
  	if err := p.Utils.IsFree(split); err != nil {
  		return err
  	}
  
  	grp, ctx := errgroup.WithContext(context.Background())
  
  	// on an assignment for request
  	p.Assignment(grp, procs, split)
  
  	if err := p.Utils.ProgressBar(ctx); err != nil {
  		return err
  	}
  
  	// wait for Assignment method
  	if err := grp.Wait(); err != nil {
  		return err
  	}
  
  	return nil
  }
docs: // Download method distributes the task to each goroutine for each URL