github.com/nak3/source-to-image@v1.1.10-0.20180319140719-2ed55639898d/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 utilglog "github.com/openshift/source-to-image/pkg/util/glog" 7 ) 8 9 var glog = utilglog.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 glog.V(1).Info("No source location defined (the assemble script is responsible for obtaining the source)") 19 20 return &git.SourceInfo{}, nil 21 }