| 
									
										
										
										
											2014-06-02 23:32:42 -07:00
										 |  |  | 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"` | 
					
						
							| 
									
										
										
										
											2015-08-03 13:09:07 +01:00
										 |  |  |     def self.stage_deps(resources, target) | 
					
						
							| 
									
										
										
										
											2016-02-21 13:15:12 +01:00
										 |  |  |       opoo "tried to stage empty resources array" if resources.empty? | 
					
						
							| 
									
										
										
										
											2014-09-07 14:07:12 -05:00
										 |  |  |       resources.grep(Resource::Go) { |resource| resource.stage(target) } | 
					
						
							| 
									
										
										
										
											2014-06-02 23:32:42 -07:00
										 |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | end |