Since the list of capabilities is derived from a header with comments in it, we should be able to extend the parsing of that header to propagate the comments too in such a way that the Go code's auto-documentation reveals it.
This was "fixed" in 2.39, with a more manual solution: https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=cae0e745e07cf8f4cabea9e293642f1e025f7eef With some code that required the existence of the strings.ReplaceAll() function. Unfortunately, it turns out that this function is quite new, and caused the build to fail against older Go build tools. I've replaced this with a strings.Replace(...,-1) call with this post libcap-2.39 patch: https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=ae095f0130a0c9780ad8ff560a9106a206179412