kubesphere.io/s2irun@v3.2.1+incompatible/pkg/scm/downloaders/empty/noop.go (about) 1 package empty 2 3 import ( 4 "github.com/kubesphere/s2irun/pkg/api" 5 "github.com/kubesphere/s2irun/pkg/scm/git" 6 utilglog "github.com/kubesphere/s2irun/pkg/utils/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 }