CycloneDX / cyclonedx-go

Go library to consume and produce CycloneDX Software Bill of Materials (SBOM)

Home Page:https://cyclonedx.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Investigate how to best get rid of slice pointers

nscuro opened this issue · comments

Currently, we're using slice pointers (e.g. *[]string) to work around a limitation of encoding/xml.

It works, but it's not pretty. This is painfully obvious when trying to iterate over elements of those slices and having to dereference and nil check all the time. It'd be great if we could just have normal slices instead.

Most likely, we'll have to introduce a lot more custom (de-)serialization code specific to the XML format to make this work.

Is it known if anyone is actively working on this?

If not, and I have some spare time (in short supply for me at the moment, but you never know...) I might take a shot at fixing this, since as a user (thanks for this lib, by the way!!!!) I definitely feel the rough edges caused by these pointers. Just don't want to duplicate efforts if someone else is already working on this problem 😁 .

I imagine any extra existing context would be helpful too (e.g., "I tried doing it but it was harder than I thought because X, Y or Z").