Skip to content

Conversation

romshark
Copy link
Contributor

A standard atomic.Bool is available since Go 1.19. The dependency on go.uber.org/atomic is obsolete.

dhui
dhui previously approved these changes Aug 19, 2025
Copy link
Member

@dhui dhui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@romshark Thanks for the cleanup! I'll merge once tests are passing (failure seemed transient).

@@ -64,7 +59,7 @@ type Spanner struct {

config *Config

lock *uatomic.Uint32
lock atomic.Bool
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this cleanup!

@@ -54,7 +54,7 @@ func TestCasRestoreOnErr(t *testing.T) {

testcases := []struct {
name string
lock *atomic.Bool
lock bool
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this change made because there's no way to initialize sync/atomic.Bool to true in a single statement?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct.

@coveralls
Copy link

coveralls commented Aug 19, 2025

Coverage Status

coverage: 56.309% (-0.005%) from 56.314%
when pulling d2791e1 on romshark:master
into 7108d80 on golang-migrate:master.

@dhui dhui merged commit 8945e85 into golang-migrate:master Aug 20, 2025
8 checks passed
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.

3 participants