Instead of
%files %license vendor/modules.txt
we should allow something like
%files %go_vendor_file vendor/modules.txt
where %go_vendor_file just expands to %license. This way, if support for the go_mod_vendor generator is not available, the package build will no longer silently fail.
%go_vendor_file
%license