mirror of
https://github.com/ivabus/pantry
synced 2024-11-25 18:05:07 +03:00
+go.uber.org/mock/mockgen -- GoMock is a mocking framework for the Go programming language
This commit is contained in:
parent
bde580ce10
commit
ff6a86cc11
3 changed files with 42 additions and 0 deletions
5
projects/go.uber.org/mock/mockgen/foo.go
Normal file
5
projects/go.uber.org/mock/mockgen/foo.go
Normal file
|
@ -0,0 +1,5 @@
|
|||
package foo
|
||||
|
||||
type Bar interface {
|
||||
Baz(string) error
|
||||
}
|
3
projects/go.uber.org/mock/mockgen/go.mod
Normal file
3
projects/go.uber.org/mock/mockgen/go.mod
Normal file
|
@ -0,0 +1,3 @@
|
|||
module example
|
||||
|
||||
go 1.20
|
34
projects/go.uber.org/mock/mockgen/package.yml
Normal file
34
projects/go.uber.org/mock/mockgen/package.yml
Normal file
|
@ -0,0 +1,34 @@
|
|||
distributable:
|
||||
url: git+https://github.com/uber-go/mock
|
||||
ref: v{{version}}
|
||||
|
||||
versions:
|
||||
github: uber-go/mock
|
||||
strip: /^v/
|
||||
|
||||
dependencies:
|
||||
go.dev: ^1.20
|
||||
|
||||
build:
|
||||
dependencies:
|
||||
goreleaser.com: "*"
|
||||
git-scm.org: "*"
|
||||
script: |
|
||||
goreleaser build --clean --single-target --skip=validate
|
||||
mkdir -p "{{ prefix }}"/bin
|
||||
mv dist/mock_$PLATFORM/mockgen "{{ prefix }}"/bin
|
||||
env:
|
||||
CGO_ENABLED: 0
|
||||
darwin/aarch64: {PLATFORM: darwin_arm64}
|
||||
darwin/x86-64: {PLATFORM: darwin_amd64_v1}
|
||||
linux/aarch64: {PLATFORM: linux_arm64}
|
||||
linux/x86-64: {PLATFORM: linux_amd64_v1}
|
||||
|
||||
provides:
|
||||
- bin/mockgen
|
||||
|
||||
test:
|
||||
script: |
|
||||
mockgen --version | grep "v{{version}}"
|
||||
mockgen -source=foo.go -destination=foo_mock.go
|
||||
test -f foo_mock.go
|
Loading…
Reference in a new issue