diff options
Diffstat (limited to 'lib/license/finder/ext/go_dep.rb')
| -rw-r--r-- | lib/license/finder/ext/go_dep.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/license/finder/ext/go_dep.rb b/lib/license/finder/ext/go_dep.rb new file mode 100644 index 0000000..f2867d3 --- /dev/null +++ b/lib/license/finder/ext/go_dep.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module LicenseFinder + class GoDep + def active? + return if project_path.to_path.include?('/vendor/') + + project_path.join('Godeps/Godeps.json').exist? + end + + def prepare + within_project_path do + tool_box.install(tool: :golang) + shell.execute([:go, :install, '-i', 'github.com/golang/dep/cmd/dep'], capture: false) + shell.execute([:asdf, :reshim], capture: false) + end + end + end +end |
