Skip to content

v1.11.1

Compare
Choose a tag to compare
@aknysh aknysh released this 03 Nov 14:00
· 214 commits to main since this release
6504dd6

what

  • Update custom commands
  • Refactor custom commands code

why

  • When parsing and executing CLI custom commands, clone the command struct into a local variable because of the automatic closure in the Run function of the Cobra command (the last processed command config affects all the previous ones). Cloning will make a closure over the local variable which is different in each iteration (we cloned just Go slices before, but we need to clone Go maps as well, so we clone the whole struct instead)