3 ms·
For our backend[1], - We are using the default test framework that comes with Go; go test. - We usually follow Postel's law which translated to Go, would be:
by RabbitmqGuy 6y ago
For our backend[1],
- We are using the default test framework that comes with Go; go test.
- We usually follow Postel's law which translated to Go, would be: `Accept interfaces, return concrete types`[2]
This enables us to pass in fake interfaces during tests.
I haven't checked what kind of performance cost(if any) we may be paying by passing around interfaces instead of concrete implementations; but performance has not been a problem so far so we are just happy with our approach.
- We do not use any http web frameworks, we are just using stdlib's net/http.
We pair that with certmagic[3] for automated TLS certificate issuance and renewal.
I like the performance of Go, it is easy to pick up and it comes with a pretty great stdlib.
What I do not like is the fact that it has nil pointers, and you tend to run into one or two nil pointer dereference errors once in a while.
1. https://errorship.com/ https://errorship.com/
2. https://blog.chewxy.com/2018/03/18/golang-interfaces/ https://blog.chewxy.com/2018/03/18/golang-interfaces/
3. https://github.com/caddyserver/certmagic https://github.com/caddyserver/certmagic