python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Common Bazel gomock rule
Is there a way to declare a gomock rule in one library and reference it in another? The instructions for gomock work for interfaces declared in the same package. For example:
backend/service/db/BUILD....
Spencer Connaughton
Votes: 0
Answers: 0
Golang: Mock an interface method before Init method is called
How can I mock something that gets called in a package init() method?
For example:
main.go
var myService MyService = myservicepkg.New()
func init(){
response := myService.get()
}
func otherMetho...
cosbor11
Votes: 0
Answers: 3
How to use gomock with sqlc
I'd like to write unit tests for functions generated by sqlc but I don't understand how to use gomock. I'm new to mocking.
Below I'll describe a bit how sqlc generation works.
So, sqlc generates an in...
Vsevolod Molchanov
Votes: 0
Answers: 0
undefined: gomock.AssignableToTypeOf
I'm getting this error: undefined: gomock.AssignableToTypeOf
It is occurring while using function gomock.AssignableToTypeOf of package github.com/golang/mock"
This starts occurring when I have Up...
Gagan Kalra
Votes: 0
Answers: 0