Class: Dependabot::GoModules::FileFetcher

Inherits:
Object
  • Object
show all
Defined in:
lib/dependabot/linguist/file_fetchers/go_modules.rb

Instance Method Summary collapse

Instance Method Details

#fetch_filesObject

Raises:

  • (Dependabot::DependencyFileNotFound)


31
32
33
34
35
36
# File 'lib/dependabot/linguist/file_fetchers/go_modules.rb', line 31

def fetch_files
  raise(Dependabot::DependencyFileNotFound, Pathname.new(File.join(directory, "go.mod")).cleanpath.to_path) if go_mod.nil?
  fetched_files = [go_mod]
  fetched_files << go_sum unless go_sum.nil?
  fetched_files
end