various: extract magic numbers into named constants
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I854b2f9b5f39e4629c32e5681e6322826a6a6964
This commit is contained in:
parent
f46697bd21
commit
7b06c4f2ca
4 changed files with 22 additions and 9 deletions
|
|
@ -4,6 +4,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"notashelf.dev/watchdog/internal/config"
|
||||
"notashelf.dev/watchdog/internal/limits"
|
||||
)
|
||||
|
||||
type PathNormalizer struct {
|
||||
|
|
@ -14,7 +15,7 @@ type PathNormalizer struct {
|
|||
func NewPathNormalizer(cfg config.PathConfig) *PathNormalizer {
|
||||
return &PathNormalizer{
|
||||
cfg: cfg,
|
||||
maxLength: 2048,
|
||||
maxLength: limits.MaxPathLen,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue