I think just calling dh_makeshlibs -Xlibgolang at the end of dh_makegolangshlibs would work pretty well, but I guess it's almost as easy and more correct to just -X the shared libraries we have done the work for.
Not at all sure how to do the bonus bit, AFAICT the overide_ rule detection is in /usr/bin/dh itself not in any library package (and is pretty hair-raising).
Oops.
I think just calling dh_makeshlibs -Xlibgolang at the end of dh_makegolangshlibs would work pretty well, but I guess it's almost as easy and more correct to just -X the shared libraries we have done the work for.
Not at all sure how to do the bonus bit, AFAICT the overide_ rule detection is in /usr/bin/dh itself not in any library package (and is pretty hair-raising).