]> Cypherpunks repositories - keks.git/commitdiff
Non exportable const
authorSergey Matveev <stargrave@stargrave.org>
Thu, 12 Dec 2024 09:55:28 +0000 (12:55 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 12 Dec 2024 10:14:59 +0000 (13:14 +0300)
gyac/dec.go

index de994d67049c3c9487476d278d962367a11067f39cc4c8a4d1e5c97c89c6b6ef..6bf959123ba6d36c465779aa8168b2e171dcf5b31a52bfc0667934b6005aafc0 100644 (file)
@@ -22,7 +22,7 @@ import (
        "go.cypherpunks.su/yac/gyac/types"
 )
 
-const ParseMaxRecursionDepth = 1 << 10
+const parseMaxRecursionDepth = 1 << 10
 
 var (
        ErrMapBadKey     = errors.New("map bad key")
@@ -59,7 +59,7 @@ func decode(
        allowContainers, expectEOC bool,
        recursionDepth int,
 ) (item Item, tail []byte, err error) {
-       if recursionDepth > ParseMaxRecursionDepth {
+       if recursionDepth > parseMaxRecursionDepth {
                err = errors.New("deep recursion")
                return
        }