mirror of
https://github.com/flatcar/scripts.git
synced 2026-01-15 21:41:38 +01:00
The slots were only used to repeatedly generate the same path to a directory where the package ebuild diff is saved. So instead, generate the output paths somewhere in outer scope, put them into a struct and pass that around. That means that: - We pass one parameter less (a name of a struct instead of two slots). - We can make it easier to change the output directory later (changing it in a function like update_dir or update_dir_non_slot may affect locations we didn't want to change, whereas changing the value in struct scopes the affected areas). This will come in handy later, when we put package update handling into jobs, where each job will have its own output directory. This does not remove the repeated generation of the paths, but it is a first step.