Our great sponsors
|5 days ago||20 days ago|
|MIT License||GNU General Public License v3.0 or later|
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.
Is gomock still maintained and recommended?
7 projects | reddit.com/r/golang | 6 Mar 2023
FWIW, I've been using testify and mockery for years.7 projects | reddit.com/r/golang | 6 Mar 2023
To answer OP directly, I am largely quite happy with mockery (and testify) to write expressive tests.
Golang, GraphQL y Postgress
2 projects | reddit.com/r/devsarg | 26 Jan 2023
Como herramientas te recomiendo: FastJson https://github.com/valyala/fastjson : Si necesitas leer jsons Testify https://github.com/stretchr/testify : Para mockear y testear
How to develop a Web app in go
9 projects | reddit.com/r/golang | 19 Jan 2023
Indispensable for testing your code: https://github.com/stretchr/testify
What's your favourite part of unit testing?
2 projects | reddit.com/r/golang | 19 Jan 2023
Best tool in the ecosystem testify. Learn about Table driven test, suite - saves your time so much with setup & teardown. Absolutely one thing you need to follow, if you see anything breaking (or bugs) add tests for that, could be unit tests or integration tests, this's of huge value and reduces manual testsing.
8 projects | reddit.com/r/golang | 10 Jan 2023
I use https://github.com/stretchr/testify in tests, it prints structs and diffs very well
Learning Go and I don't like some features, maybe it's me?
3 projects | reddit.com/r/golang | 14 Dec 2022
Criando uma API Rest com Fiber - Uma história pessoal de aprendizado
7 projects | dev.to | 22 Nov 2022
How do you do DB preparation in e2e tests?
3 projects | reddit.com/r/golang | 20 Oct 2022
Assertion libraries that people seem to love: - testify (my favorite) - go-cmp is a more barebones library - gotest.tools -- I have never used this but some swear by it
goyek v2 RC - feedback needed
3 projects | reddit.com/r/golang | 20 Oct 2022
It can be easily used with https://pkg.go.dev/flag or https://github.com/spf13/viper (for configuration) and even https://github.com/stretchr/testify (for asserting)
Handling currency values: facts and best practices
2 projects | dev.to | 10 Jan 2023
my first golang project!
7 projects | reddit.com/r/golang | 8 May 2022
Integers, or something like this: https://github.com/shopspring/decimal
80x improvements in caching by moving from JSON to gob
6 projects | reddit.com/r/golang | 11 Apr 2022
I make heavy use of caching, and was caching both in-memory and in Redis using JSON to convert the data in to a string. The struct itself isn't super complicated, one level nested, and some fields use the shopspring/decimal library.
Unexported interfaces usage question
2 projects | reddit.com/r/golang | 16 Jan 2022
I actually use this to represent monetary values btw :)
How to round(2) float64?
2 projects | reddit.com/r/golang | 10 Dec 2021
Check out https://github.com/shopspring/decimal for doing money related calculations.2 projects | reddit.com/r/golang | 10 Dec 2021
Have a look at how it's done in some of the popular libraries, eg https://github.com/shopspring/decimal or https://golangrepo.com/repo/rhymond-go-money-go-financial
Library recommendation -- money calculations, more accurate handling of floats
5 projects | reddit.com/r/golang | 22 Oct 2021
We personally use https://github.com/shopspring/decimal and it works well.
What are your favorite packages to use?
55 projects | reddit.com/r/golang | 15 Aug 2021
decimal, one of the first Go library that created to work with decimal and monetary value.
What libraries from other languages do you wish were ported over into go?
13 projects | reddit.com/r/golang | 27 Jul 2021
Introducing go-financial 🎉!
3 projects | reddit.com/r/golang | 25 Jan 2021
I forget what problem i had with that package, but it forced me to convert everything to https://github.com/shopspring/decimal
What are some alternatives?
ginkgo - A Modern Testing Framework for Go
GoConvey - Go testing in the browser. Integrates with `go test`. Write behavioral tests in Go.
gomega - Ginkgo's Preferred Matcher Library
gomock - GoMock is a mocking framework for the Go programming language.
gotest.tools - A collection of packages to augment the go testing package and support common patterns.
go-cmp - Package for comparing Go values in tests
gocheck - Rich testing for the Go language
assert - :exclamation:Basic Assertion Library used along side native go testing, with building blocks for custom assertions
Golang Crypto Trading Bot - A golang implementation of a console-based trading bot for cryptocurrency exchanges
godog - Cucumber for golang
goblin - Minimal and Beautiful Go testing framework
decimal - A high-performance, arbitrary-precision, floating-point decimal library.