Tags » golang
TIL: Use the
-vflag to get verbose output from Go testsThis prints all
t.Logandt.Logfcalls, even if the test succeeds or times out.TIL: Using Go to write to a file, but only if it doesn’t exist yet
Opening a file with
os.O_CREATE|os.O_EXCLwill ensure you only create the file if it doesn’t already exist.TIL: Repeatedly run flaky Go tests with
stressIt runs your test hundreds of times, which can be useful for finding flaky failures.
TIL: How to list the tests that will be run by a
go testcommandUse
go test -list={pattern}.TIL: You can change the size of tabs on web pages with the
tab-sizepropertyTIL: Go’s compiler is smart enough to spot division by zero errors
TIL: Parsing JSON in Go with a required field
Finding SNS topics without any subscriptions
I’m trying out Go, and I wrote a tool to help me find SNS topics that don’t have any subscriptions.