You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
The key has expired.
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)