|8 months ago||6 days ago|
|MIT License||Apache License 2.0|
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
How do you control behaviour in mocked interface ?
5 projects | reddit.com/r/golang | 21 Jan 2022
In our company projects we use https://github.com/gojuno/minimock for units
How do you decide you are gonna use interface?
2 projects | reddit.com/r/golang | 2 May 2022
If you don't know how to mock databases, checkout some tutorials on it, it's a big topic, and I can't give you all the details on it. Checkout these repositories, they are used for mocking in golang https://github.com/golang/mock, https://github.com/stretchr/testify
Mocking database or use a test database
5 projects | reddit.com/r/golang | 18 Apr 2022
You can test the code outside those data classes using more general mocks. https://github.com/golang/mock
Testes unitários com Golang
2 projects | dev.to | 24 Mar 2022
mock listener/conn via injection or just test a running server?
1 project | reddit.com/r/golang | 23 Jan 2022
Have a look at https://github.com/golang/mock.
Dependency Injection in Golang
1 project | dev.to | 20 Jan 2022
If you want to write tests, DI also can help you! Sometimes you need mocks for tests (to be independent of some modules like logger in tests), you have to generate it! There is an amazing tool for this task in go - GoMock. When you describe only needed methods in DI interface, the GoMock generate mocks just for those methods - it is faster and more readable in practice, than hundreds methods in mocks.
What is the real USP of Go's interfaces when compared to those in Java or C#?
1 project | reddit.com/r/golang | 9 Dec 2021
I really disagree with this statement. In fact, there is a Google-developed mocking tool in the official Go organization - https://github.com/golang/mock. I am not a huge fan of mocking and I avoid it when I can, but there is nothing that indicates you must be writing Java code in Go if you're using mocks. You'll even find the use of mocks in the Go standard library test code.
Gerando mocks de interfaces no go!
2 projects | dev.to | 10 Nov 2021
What mocking framework do you prefer?
6 projects | reddit.com/r/golang | 23 Oct 2021
Gomock or mockery?6 projects | reddit.com/r/golang | 23 Oct 2021
I used to use Mockery, but it was unmaintained for a long time, and not that great, so these days it's Mock, which is nicer in several ways.
Mocking with High-Order Functions in Go
1 project | reddit.com/r/golang | 6 Aug 2021
Honestly curious - why wouldn't you use something like https://github.com/golang/mock to generate your mocks from an interface. Way more productive, consistent and cleaner. Spend more time and focus on your business logic rather than something that's already been solved.
What are some alternatives?
sqlx - general purpose extensions to golang's database/sql
mockery - A mock code autogenerator for Golang
Testify - A toolkit with common assertions and mocks that plays nicely with the standard library
pgx - PostgreSQL driver and toolkit for Go
counterfeiter - A tool for generating self-contained, type-safe test doubles in go
go-sqlmock - Sql mock driver for golang to test database interactions
monkey - Monkey patching in Go
zerolog - Zero Allocation JSON Logger
gock - HTTP traffic mocking and testing made easy in Go ༼ʘ̚ل͜ʘ̚༽
realize - Realize is the #1 Golang Task Runner which enhance your workflow by automating the most common tasks and using the best performing Golang live reloading.
moq - Interface mocking tool for go generate
hoverfly - Lightweight service virtualization/API simulation tool for developers and testers