We have a lot of enums in config.go and log.go, and it would be convenient if they all had String() method that returned enum's symbolic representation. This can be easily achieved using stringer tool.
Steps:
add stringer magic comment to all enums: Interface, Protocol, FecEncoding, PacketEncoding, FrameEncoding, ChannelSet, ResamplerBackend, ResamplerProfile, ClockSource, LogLevel (note: no need to add it to Slot, it's not a enum)
configure stringer to trim enum's prefix
add Makefile target that runs go generate and document it in README
add CI step (in build.yml) checking that we did not forget to run go generate and commit results (it may run go generate on CI and then check git status)
We have a lot of enums in config.go and log.go, and it would be convenient if they all had String() method that returned enum's symbolic representation. This can be easily achieved using stringer tool.
Steps:
add stringer magic comment to all enums: Interface, Protocol, FecEncoding, PacketEncoding, FrameEncoding, ChannelSet, ResamplerBackend, ResamplerProfile, ClockSource, LogLevel (note: no need to add it to Slot, it's not a enum)
configure stringer to trim enum's prefix
add Makefile target that runs go generate and document it in README
add CI step (in build.yml) checking that we did not forget to run go generate and commit results (it may run go generate on CI and then check git status)