There are usages of append where the result is not assigned back to the variable. After going through them, most of do not break. In fact, it only breaks things when one slice is stored as a variable or a struct's field, and a prefix of this slice is appended to.
This PR fixes problematic appends in populateMessage, which breaks in certain cases (see the test case added).
There are usages of
append
where the result is not assigned back to the variable. After going through them, most of do not break. In fact, it only breaks things when one slice is stored as a variable or a struct's field, and a prefix of this slice is appended to.This PR fixes problematic appends in
populateMessage
, which breaks in certain cases (see the test case added).It also fixes the append in
WalkFileInfos
.