adm: Fix panic on negative value #1127

Merged
fyrchik merged 1 commit from Anoke/frostfs-node:negative-value-issue into master 2024-05-13 16:44:08 +00:00

View file

@ -48,7 +48,7 @@ func SetPolicyCmd(cmd *cobra.Command, args []string) error {
value, err := strconv.ParseUint(v, 10, 32)
if err != nil {
return fmt.Errorf("can't parse parameter value '%s': %w", args[1], err)
return fmt.Errorf("can't parse parameter value '%s': %w", args[i], err)
fyrchik marked this conversation as resolved Outdated

Can you change the commit message format to: [#1067] frostfs-adm: Fix panic on negative value.
Can you include all changes in one commit?

Can you change the commit message format to: `[#1067] frostfs-adm: Fix panic on negative value`. Can you include all changes in one commit?

Most likely, it should be args[i], we do this inside the loop.

Most likely, it should be `args[i]`, we do this inside the loop.

I meant the commit message, not the title of the Pull Request. Please use the command:
git commit -s -m "[#1067] frostfs-adm: Fix panic on negative value"
If you're using an IDE to make commits, ensure that commit signing is enabled in the settings.

I meant the commit message, not the title of the Pull Request. Please use the command: ```git commit -s -m "[#1067] frostfs-adm: Fix panic on negative value"``` If you're using an IDE to make commits, ensure that `commit signing` is enabled in the settings.
}
emit.AppCall(bw.BinWriter, policy.Hash, "set"+k, callflag.All, int64(value))