github.com/openshift/source-to-image@v1.4.1-0.20240516041539-bf52fc02204e/pkg/scm/downloaders/empty/noop.go (about) 1 package empty 2 3 import ( 4 "github.com/openshift/source-to-image/pkg/api" 5 "github.com/openshift/source-to-image/pkg/scm/git" 6 utillog "github.com/openshift/source-to-image/pkg/util/log" 7 ) 8 9 var log = utillog.StderrLog 10 11 // Noop is for build configs with an empty Source definition, where 12 // the assemble script is responsible for retrieving source 13 type Noop struct { 14 } 15 16 // Download is a no-op downloader so that Noop satisfies build.Downloader 17 func (n *Noop) Download(config *api.Config) (*git.SourceInfo, error) { 18 log.V(1).Info("No source location defined (the assemble script is responsible for obtaining the source)") 19 20 return &git.SourceInfo{}, nil 21 }