This action will delete this post on this instance and on all federated instances, and it cannot be undone. Are you certain you want to delete this post?
This action will delete this post on this instance and on all federated instances, and it cannot be undone. Are you certain you want to delete this post?
This action will block this actor and hide all of their past and future posts. Are you certain you want to block this actor?
This action will block this object. Are you certain you want to block this object?
Go `sqlmock` from Data Dog can be useful for making sure you know exactly which queries are being sent to the DB. But it has a limited set of type matchers and when matchers don't match, it's so hard to figure out what was actually sent. It supports custom matchers.
I figured out a little pattern I like there I pass `t` from the test (`testing.T`) into the custom matcher's struct and then use `t.Log()` to pass back what the heck was wrong with the value passed. So many WTFs saved when tests fail. #Golang
type MicrosTimestamp struct { t *testing.T } func (r MicrosTimestamp) Match(v driver.Value) bool { i, ok := v.(int64) if !ok { r.t.Log(fmt.Sprintf("TESTS: MicrosTimestamp got %v which is not an int64", v)) return false } ...