There's a lot of places where we have ad-hoc ways to construct pointers to things - either via temporary variables, referencing the first element in a slice, or by a local function to produce pointers.
We can replace those with lo.ToPtr (like what the control plane already uses) to help with readability and consistency.
To find the locations that needed changing, I used
There's a lot of places where we have ad-hoc ways to construct pointers to things - either via temporary variables, referencing the first element in a slice, or by a local function to produce pointers.
We can replace those with
lo.ToPtr
(like what the control plane already uses) to help with readability and consistency.To find the locations that needed changing, I used
Originally discussed here: https://github.com/neondatabase/autoscaling/pull/895#discussion_r1576977602