diff options
| author | Misty De Meo | 2014-06-02 23:32:42 -0700 | 
|---|---|---|
| committer | Misty De Meo | 2014-09-01 19:56:43 -0700 | 
| commit | 4743fc1662d2e7ca5f952ff10089edad9e52ff07 (patch) | |
| tree | 9213c5fc3384809b101cd372147b7c1a775127b4 /Library/Homebrew/language | |
| parent | aec47d8a19f58a11d397f5421d9408f52353e530 (diff) | |
| download | brew-4743fc1662d2e7ca5f952ff10089edad9e52ff07.tar.bz2 | |
Add Go language module, resources
This introduces a new GoResource category of resource. GoResources
have a specialized stage method which allows a resource to stage
itself into a gopath.
The new Go language module provides a one-liner to stage all
GoResources present in the formula.
Diffstat (limited to 'Library/Homebrew/language')
| -rw-r--r-- | Library/Homebrew/language/go.rb | 14 | 
1 files changed, 14 insertions, 0 deletions
diff --git a/Library/Homebrew/language/go.rb b/Library/Homebrew/language/go.rb new file mode 100644 index 000000000..c0b4fb0a6 --- /dev/null +++ b/Library/Homebrew/language/go.rb @@ -0,0 +1,14 @@ +require "resource" + +module Language +  module Go +    # 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"` +    def self.stage_deps resources, target +      godeps = resources.grep(Resource::Go) +      godeps.each {|resource| resource.stage target} +    end +  end +end  | 
