[#859] config: rename shallow_* to width and depth

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2021-10-18 17:20:03 +03:00 committed by Alex Vanin
parent 684e3e0ae0
commit c015b04ed5
7 changed files with 25 additions and 25 deletions

View file

@ -44,13 +44,13 @@ func (x *Config) Size() uint64 {
return SizeDefault
}
// ShallowDepth returns value of "shallow_depth" config parameter.
// ShallowDepth returns value of "depth" config parameter.
//
// Returns ShallowDepthDefault if value is not a positive number.
func (x *Config) ShallowDepth() uint64 {
d := config.UintSafe(
(*config.Config)(x),
"shallow_depth",
"depth",
)
if d > 0 {
@ -60,13 +60,13 @@ func (x *Config) ShallowDepth() uint64 {
return ShallowDepthDefault
}
// ShallowWidth returns value of "shallow_width" config parameter.
// ShallowWidth returns value of "width" config parameter.
//
// Returns ShallowWidthDefault if value is not a positive number.
func (x *Config) ShallowWidth() uint64 {
d := config.UintSafe(
(*config.Config)(x),
"shallow_width",
"width",
)
if d > 0 {

View file

@ -61,14 +61,14 @@ func (x *Config) Perm() fs.FileMode {
return fs.FileMode(p)
}
// ShallowDepth returns value of "shallow_depth" config parameter.
// ShallowDepth returns value of "depth" config parameter.
//
// Returns ShallowDepthDefault if value is out of
// [1:fstree.MaxDepth] range.
func (x *Config) ShallowDepth() int {
d := config.IntSafe(
(*config.Config)(x),
"shallow_depth",
"depth",
)
if d >= 1 && d <= fstree.MaxDepth {