-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Aliases in Cobra and Viper are relatively complex and viper.RegisterAlias does not do what would be expected as ENV handling is a very special case. This commit fixes up the handling of aliases specifically for chunk size and minimuim chunk size. * CLI Option Set * NEW ENV VAR * Deprecated ENV Var * Default Value For ChunkSize and MinimumChunkSize we now explicitly disallow setting both --chunk-size and --minimum-chunk-size as CLI options. If PGET_CHUNK_SIZE is set, we utilize that value except if the cli option(s) are set. If PGET_MINIMUM_CHUNK_SIZE is set * If PGET_CHUNK_SIZE is set to a non-default value a warning is emitted, and PGET_CHUNK_SIZE is used.. * If PGET_CHUNK_SIZE is the default value, PGET_MINIMUM_CHUNK_SIZE is set as PGET_CHUNK_SIZE and a deprecation warning is emitted. Additionally, viper calls now all reference config.OptChunkSize
- Loading branch information
1 parent
fae7259
commit e71b6b2
Showing
3 changed files
with
42 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters