Skip to content
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

Merged
merged 22 commits into from
Dec 23, 2022
Merged

DSU-1393 Run unit tests on CI #149

merged 22 commits into from
Dec 23, 2022

Conversation

@vtopc vtopc requested a review from thrawn01 December 20, 2022 14:34
@vtopc vtopc marked this pull request as ready for review December 20, 2022 14:35
@vtopc vtopc requested review from a team and obukhov-sergey December 20, 2022 14:36
for i := range starts {
err := starts[i].err
want := starts[i].want
testFormatCompleteCompare(t, i, err, "%+v", want, false)
Copy link

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

Copy link
Contributor Author

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

@vtopc vtopc requested a review from Baliedge December 21, 2022 09:24
@vtopc vtopc merged commit 343e7ae into master Dec 23, 2022
@vtopc vtopc deleted the vtopc/DSU-1393 branch December 23, 2022 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants