code: func NewWorker(opt Opt) (*Worker, error) {
  	sm, err := source.NewManager()
  	if err != nil {
  		return nil, err
  	}
  
  	cm := opt.CacheManager
  	sm.Register(opt.ImageSource)
  
  	gs, err := git.NewSource(git.Opt{
  		CacheAccessor: cm,
  		MetadataStore: opt.MetadataStore,
  	})
  	if err == nil {
  		sm.Register(gs)
  	} else {
  		logrus.Warnf("Could not register builder git source: %s", err)
  	}
  
  	hs, err := http.NewSource(http.Opt{
  		CacheAccessor: cm,
  		MetadataStore: opt.MetadataStore,
  		Transport:     opt.Transport,
  	})
  	if err == nil {
  		sm.Register(hs)
  	} else {
  		logrus.Warnf("Could not register builder http source: %s", err)
  	}
  
  	ss, err := local.NewSource(local.Opt{
  		CacheAccessor: cm,
  		MetadataStore: opt.MetadataStore,
  	})
  	if err == nil {
  		sm.Register(ss)
  	} else {
  		logrus.Warnf("Could not register builder local source: %s", err)
  	}
  
  	return &Worker{
  		Opt:           opt,
  		SourceManager: sm,
  	}, nil
  }
docs: // NewWorker instantiates a local worker