go generate will - if package is set - generate the step go files in a subfolder of /cmd
as the _generated.go files uses heavily functions from /cmd/piper.go they had to be moved to /cmd/piper/GeneralConfig.go to prevent circular imports. The _generated.go files will no longer access the global GeneralConfig structure from /cmd/piper.go but instead create with /cmd/piper/GeneralConfig.go -> CreateGeneralConfigCopyFromFlags() their own local copy of it.
/cmd/version.go -> GitCommit is again not accessible due to circular imports, thus as preliminary work around it has been added to the GeneralConfig structure and is passed as new Flag. Cleaner solution would be to move version.go into a subfolder like GeneralConfig but did not want to overload the PR
step abapAddonAssemblyKitCheckCVs has been moved to a subfolder "abapAddonAssemblyKit" as example (further will follow if PR is accepted but PR has already enough files so did not want to overload it further). No real change was needed except change of package and the changes in the generated files.
as /pkg/generator has been adopted all _generated.go files are updated (>100 times the same change)
Benefits
/cmd folder gets smaller
faster development possible in subfolder as IDE operations on package level do not have to process hundreds of files
faster execution of unit tests as you can group relevant steps in a package and can ignore all the others
better encapsulation as functions defined by other steps are no longer in same package
piper core functionality better encapsulated in /cmd/piper package
How to Review
(5 files) main changes in /pkg/generator (4 Files + 1 File /pkg/config )
(2 files) move of /cmd/piper.go functions to /cmd/piper/GeneralConfig.go (only minor adoptions, no real change)
(5 files) example /cmd/abapAddonAssemblyKitCheckCVs* as well as /resources/metadata related step yaml file
Changes
Benefits
How to Review
successor of #4906