Module: Language::Go

Defined in:
Library/Homebrew/language/go.rb

Overview

Helper functions for Go formulae.

Class Method Summary collapse

Class Method Details

.stage_deps(resources, target) ⇒ Object

Given a set of resources, stages them to a gopath for building go software. The resource names should be the import name of the package, e.g. resource "github.com/foo/bar"


14
15
16
17
18
19
20
21
22
23
# File 'Library/Homebrew/language/go.rb', line 14

def self.stage_deps(resources, target)
  if resources.empty?
    if Homebrew::EnvConfig.developer?
      odie "tried to stage empty Language::Go resources array"
    else
      opoo "tried to stage empty Language::Go resources array"
    end
  end
  resources.grep(Resource::Go) { |resource| resource.stage(target) }
end