golang/mock
View on GitHub ↗ ★ 9,318 Go archived
GoMock is a mocking framework for the Go programming language.
11 mentions on Hacker News by 9 people: 2 stories, 9 comments · first 2017-12-11 · latest 2025-11-17
20082026
-
…to them. [0] - https://docs.python.org/3/library/unittest.mock.html#unittes... [1] - https://pkg.go.dev/github.com/golang/mock/gomock
comment by lelandbatey · 2025-11-17 · in An overly aggressive mock can work fine, but break much later -
…per execution via packages.Load¹, which is by far the primary reason why e.g. go.uber.org/mock (previously github.com/golang/mock) can become extremely slow. mockery v3 does not do this. it type-checks just once for ALL mocks, regardless…
comment by Groxx · 2025-11-07 · in Revisiting Interface Segregation in Go -
▲ 1
Uber now maintains gomock, a golang mock librarystory by selljamhere · 2023-07-05 · 0 comments
-
The commit mentions this rather sad thread: https://github.com/golang/mock/pull/627#issuecomment-1605169...
comment by underdeserver · 2023-06-28 · in Google Stopped Maintaining GoMock -
▲ 4
Google Stopped Maintaining GoMockstory by underdeserver · 2023-06-28 · 1 comment
-
…https://golang.org/pkg/testing/ + https://pkg.go.dev/mod/github.com/stretchr/testify - Mocks: https://github.com/golang/mock - Dependency Injection: None, current user of https://github.com/uber-go/dig and I regret it.
comment by bithavoc · 2020-04-16 · in Ask HN: How are you using Go to write production-grade back end services? -
…or weeks to automate all of this for C. Meanwhile for Go there exists a tool called ‘mockgen’ ( https://github.com/golang/mock ) that can automatically stomp out mocks for any interface type declared in code. Not just for the ones in your…
comment by EdSchouten · 2020-03-29 · in How is the Linux kernel tested? -
…https://github.com/buildbarn/bb-storage/blob/master/pkg/file... Pretty slick that I can now use https://github.com/golang/mock to automatically generate a mock of that.
comment by EdSchouten · 2019-08-04 · in Why a mock doesn’t work -
also check out https://github.com/golang/mock for mocking
comment by cdoxsey · 2018-01-01 · in Testing techniques in Go -
Looks like there's an official tool: https://github.com/golang/mock
comment by pstuart · 2017-12-11 · in Ask HN: How to approach testing in Golang? -
…please don't come bashing me on not contributing to open source, etc.) For mocks, I use GoMocks ( https://github.com/golang/mock ), again a "standard" lib of go. It has Expect syntax where you can assert that mocks were called in a certain…
comment by ernsheong · 2017-12-11 · in Ask HN: How to approach testing in Golang?