facebookarchive / rocks-strata

Other
133 stars 24 forks source link

Boolean flags can't have default values #27

Closed AGFeldman closed 7 years ago

AGFeldman commented 7 years ago

go-flags discards commands that have boolean flags with default values, so remove the default values. Booleans defaults to false if their flag is absent.

The go-flags behavior is caused by by https://github.com/jessevdk/go-flags/commit/7f2ab82552ae1b12e070838918ac056507c0f114 in the go-flags library and mentioned in https://github.com/facebookgo/rocks-strata/issues/25. We used https://github.com/facebookgo/rocks-strata/commit/993df44c1b2d02a088a10532df05b1e453042607 as a workaround.

This diff fixes a problem where mongoq options would disappear and also cleans up our previous workaround.

Test plan: Compile strata driver and mongoq driver and check that ./strata show backups --help and ./mongoq --help display the show-size option.