Browse Source

fix c.capacityByFunc is nil

pull/8026/head
Konstantin Lebedev 4 weeks ago
parent
commit
20e5952c35
  1. 2
      weed/shell/command_volume_balance.go

2
weed/shell/command_volume_balance.go

@ -121,9 +121,9 @@ func (c *commandVolumeBalance) Do(args []string, commandEnv *CommandEnv, writer
}
return fmt.Errorf("use \"ALL\", \"ACTIVE\" or \"FULL\"")
})
c.capacityByFunc = capacityByMaxVolumeCount
balanceCommand.Func("capacityBy", "capacityBy function name use \"MAX_VOLUME_COUNT\", \"FREE_VOLUME_COUNT\" and \"MIN_VOLUME_DENSITY\"", func(flagValue string) error {
if flagValue == "" {
c.capacityByFunc = capacityByMaxVolumeCount
return nil
}
for allowed, allowedCapacityByFunc := range allowedCapacityBy {

Loading…
Cancel
Save