• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

enbility / spine-go / 30638305198
93%

Build:
DEFAULT BRANCH: dev
Ran 31 Jul 2026 02:24PM UTC
Jobs 1
Files 63
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

31 Jul 2026 02:22PM UTC coverage: 92.832% (+0.006%) from 92.826%
30638305198

push

github

web-flow
fix(model): merge nested pointer-to-struct fields in updateFields (#103)

## Summary

`updateFields` in `model/collection_operations.go` only checked whether
a
field's pointer itself was `nil` before deciding to copy a value from
the
existing entry. For nested struct pointers (e.g.
`LoadControlLimitDataType.Value
*ScaledNumberType`) this meant: if the incoming partial write set
`Value` to a
non-nil pointer but left an inner field like `Scale` as `nil` (i.e.
omitted),
that inner field was never merged and stayed `nil` instead of being
preserved
from the existing entry.

Fix: split `updateFields[T]` into a thin generic wrapper and a new
non-generic `updateFieldsValue(remoteWrite bool, sV, dV reflect.Value)`
that
does the actual field-by-field merge. When both source and destination
carry
a non-nil pointer to a struct, `updateFieldsValue` now recurses into
that
struct instead of stopping at the outer pointer. Recursion has to happen
through a non-generic helper because Go generics can't infer `T` again
once
the nested value has been unwrapped via reflection.

Closes #97
Related to #94

## Testing

- Added `model/rfe_scaled_number_test.go`:
- `TestRFE_ScaledNumberType_OmitScale_PreservesExisting` — direct merge
without partial filter
- `TestRFE_ScaledNumberType_PartialFilter_OmitScale` — merge via partial
filter selector
- `go test -v ./model -run TestRFE_ScaledNumberType -count=1` passes
- `go test -v ./model -count=1` passes (existing
`collection_operations_test.go` suite unaffected)

10 of 10 new or added lines in 1 file covered. (100.0%)

6178 of 6655 relevant lines covered (92.83%)

25109.47 hits per line

Jobs
ID Job ID Ran Files Coverage
1 30638305198.1 31 Jul 2026 02:24PM UTC 63
92.83
GitHub Action Run
Source Files on build 30638305198
  • Tree
  • List 63
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30638305198
  • eb1fe185 on github
  • Prev Build on dev (#30638253918)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc