Gazelle select (9/x): refactor rules/generator.go (#502)
Gazelle select (9/x): refactor rules/generator.go (#502)

Minor refactoring in preparation for a much larger change.

Related #409
linuxerwang/rules_go,Xjs/rules_go,Xjs/rules_go,linuxerwang/rules_go,linuxerwang/rules_go,Xjs/rules_go,bazelbuild/rules_go,linuxerwang/rules_go,bazelbuild/rules_go,Xjs/rules_go,bazelbuild/rules_go,Xjs/rules_go,linuxerwang/rules_go,bazelbuild/rules_go,bazelbuild/rules_go