Skip to content

Commit

Permalink
Add impl
Browse files Browse the repository at this point in the history
  • Loading branch information
moonfruit committed Nov 22, 2023
1 parent b68a101 commit c9b2145
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Formula/impl.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
class Impl < Formula
desc "Go method stub generator"
homepage "https://github.com/josharian/impl"
url "https://github.com/josharian/impl/archive/refs/tags/v1.2.0.tar.gz"
sha256 "1a5e02e396c4d60811780af4de44ba25ff96d851d240f8b39c2086def5ecfd6d"
license "MIT"
head "https://github.com/josharian/impl.git"

depends_on "go"

def install
system "go", "build", *std_go_args(ldflags: "-s -w", output: libexec/"impl")
(bin/"impl").write_env_script libexec/"impl", GOROOT: "${GOROOT:-#{Formula["go"].opt_libexec}}"
end

test do
system "#{bin}/impl", "Test", "io.Reader"
end
end

0 comments on commit c9b2145

Please sign in to comment.