Module: Language::Go

Defined in:
language/go.rb

Overview

Helper functions for Go formulae.

Class Method Summary collapse

Class Method Details

.stage_deps(resources, target) ⇒ void

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Deprecated.

Use Go modules instead.

This method returns an undefined value.

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".

Parameters:



16
17
18
19
20
21
22
23
24
25
26
# File 'language/go.rb', line 16

def self.stage_deps(resources, target)
  odisabled "`Language::Go.stage_deps`", "Go modules"
  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