[#857] config: use size suffixes where possible

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2021-10-07 19:17:07 +03:00 committed by Leonard Lyubich
parent a0abf10c8e
commit 00f14d4dcd
3 changed files with 6 additions and 6 deletions

View file

@ -32,7 +32,7 @@ func From(c *config.Config) *Config {
//
// Returns SizeDefault if value is not a positive number.
func (x *Config) Size() uint64 {
s := config.UintSafe(
s := config.SizeInBytesSafe(
(*config.Config)(x),
"size",
)

View file

@ -92,7 +92,7 @@ func (x *Config) Compress() bool {
//
// Returns SmallSizeLimitDefault if value is not a positive number.
func (x *Config) SmallSizeLimit() uint64 {
l := config.UintSafe(
l := config.SizeInBytesSafe(
(*config.Config)(x),
"small_size_limit",
)