georgysavva / scany

Library for scanning data from a database into Go structs and more
MIT License
1.27k stars 67 forks source link

be sure field map gets unique copies per value #30

Closed PaulForgey closed 3 years ago

PaulForgey commented 3 years ago

As slices are references to a backing array, make sure each key value gets a unique copy. The existing code worked as a side effect how slices are grown but exposed the bug when nesting structures more than 3 deep.

fixes georgysavva/scany#29

codecov[bot] commented 3 years ago

Codecov Report

Merging #30 (490143f) into master (d03fac1) will increase coverage by 0.04%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #30      +/-   ##
==========================================
+ Coverage   95.06%   95.10%   +0.04%     
==========================================
  Files           4        4              
  Lines         243      245       +2     
==========================================
+ Hits          231      233       +2     
  Misses          6        6              
  Partials        6        6              
PaulForgey commented 3 years ago

linter integration appears broken