From 18bd2f807517a849844ee7836def7fb491304ae6a2a92387bf3e55e49bfb2cb1 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Thu, 12 Dec 2024 12:55:28 +0300 Subject: [PATCH] Non exportable const --- gyac/dec.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gyac/dec.go b/gyac/dec.go index de994d6..6bf9591 100644 --- a/gyac/dec.go +++ b/gyac/dec.go @@ -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 } -- 2.48.1