buf icon indicating copy to clipboard operation
buf copied to clipboard

Audit whether slicesext.ToStructMapOmitEmpty can be removed

Open bufdev opened this issue 8 months ago • 0 comments

We have a note on slicesext.ToStructMapOmitEmpty:

https://github.com/bufbuild/buf/blob/705a37b0f358afe70e347cb01c6bab5f6bb423fe/private/pkg/slicesext/slicesext.go#L149

We likely did this to make sure we didn't edit existing behavior, but I bet if we go through buf and core, we won't find anywhere that relies on the zero value being populated as a key. We just need to do this audit, and if so, delete the existing ToStructMap and rename ToStructMapOmitEmpty to ToStructMap.

bufdev avatar May 09 '25 10:05 bufdev