Ran
|
Jobs
4
|
Files
130
|
Run time
4min
|
Badge
Embed ▾
README BADGES
|
push
travis-ci
<a href="https://github.com/stripe/stripe-go/commit/<a class=hub.com/stripe/stripe-go/commit/e8809836584c2283cb87a0b68a1a467f01419fa5">e88098365<a href="https://github.com/stripe/stripe-go/commit/e8809836584c2283cb87a0b68a1a467f01419fa5">">Lock before changing field of backends (#843) * Lock before changing field of backends The `SetBackend` method updates one of the members of the package-level variable `backends`. Since it&#39;s a pointer, it&#39;s probably safe on most architectures. But the `Backends` struct already has a `sync.RWMutex` field, and earlier in the file the `GetBackend` function goes through the trouble of explicitly acquiring a read and possibly a write lock. See: https://github.com/stripe/stripe-go/blob/</a><a class="double-link" href="https://github.com/stripe/stripe-go/commit/<a class="double-link" href="https://github.com/stripe/stripe-go/commit/d94ce0ed857fb1571b9b30bd24430bdac3d50c0f">d94ce0ed8</a>">d94ce0ed8</a><a href="https://github.com/stripe/stripe-go/commit/e8809836584c2283cb87a0b68a1a467f01419fa5">/stripe.go#L666 So to be safe, and consistent with the rest of the code, it makes sense to acquire a write lock before updating the `backends` value.
4812 of 5630 relevant lines covered (85.47%)
78.95 hits per line
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | 4258.1 | 130 |
85.45 |
Travis Job 4258.1 | |
2 | 4258.2 | 130 |
85.47 |
Travis Job 4258.2 | |
3 | 4258.3 | 130 |
85.45 |
Travis Job 4258.3 | |
4 | 4258.4 | 130 |
85.47 |
Travis Job 4258.4 |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|