• Eric Paris's avatar
    Fix usage a make(struct, len()) followed by append() · 5e22e149
    Eric Paris authored
    A couple of places in the code we allocate with make() but then use
    append(), instead of copy() or direct assignment. This results in a
    slice with len() zero elements at the front followed by the expected
    data. The correct form for such usage is `make(struct, 0, len())`.
    
    I found these by running:
    ```
    $ git grep -EI -A7 'make\([^,]*, len\(' | grep 'append(' -B7 | grep -v vendor
    ```
    And then manually looking through the results. I'm sure something better
    could exist.
    5e22e149
Name
Last commit
Last update
..
BUILD Loading commit data...
OWNERS Loading commit data...
stateful_pod_control.go Loading commit data...
stateful_pod_control_test.go Loading commit data...
stateful_set.go Loading commit data...
stateful_set_control.go Loading commit data...
stateful_set_control_test.go Loading commit data...
stateful_set_status_updater.go Loading commit data...
stateful_set_status_updater_test.go Loading commit data...
stateful_set_test.go Loading commit data...
stateful_set_utils.go Loading commit data...
stateful_set_utils_test.go Loading commit data...