When combining two slices, e.g. fruit and vegetables, to create a third, e.g. food. it would seem to make sense to append fruit and vegetable and assign the result directly to food.
golangci-lint’s check: “appendAssign” suggests that is not an accepted way of doing so, with an alternative (see below) being preferrable.
What is the most idiomatic way of achieving this?
Code to illustrate question: https://go.dev/play/p/IFV6o92-HTb