-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DSU-1393 Run unit tests on CI #149
Conversation
for i := range starts { | ||
err := starts[i].err | ||
want := starts[i].want | ||
testFormatCompleteCompare(t, i, err, "%+v", want, false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious about this one: any context on why we do for i := range starts
instead of for _, start := range starts {
? More of a stylistic item but I've leaned towards the explicit form where we show that the range clause is actually 2 values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just renamed the variable based on https://dave.cheney.net/practical-go/presentations/qcon-china.html#_use_a_consistent_naming_style
Also, it can't be for _, start := range starts {
cause we need to pass index to the testFormatCompleteCompare()
.
From a performance perspective, index access is preferable for the slice of big objects - https://go-critic.com/overview.html#rangeValCopy-ref
https://mailgun.atlassian.net/browse/DSU-1393
Found issues: