Skip to content

Commit

Permalink
style: make ErrMaxVariable public
Browse files Browse the repository at this point in the history
  • Loading branch information
bdeneux committed Jul 24, 2024
1 parent f3edfbc commit 115d4be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions engine/variable.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"sync"
)

var errMaxVariables = errors.New("maximum number of variables reached")
var ErrMaxVariables = errors.New("maximum number of variables reached")

var maxVariables uint64
var varCounter = struct {
Expand All @@ -31,7 +31,7 @@ func NewVariable() Variable {
defer varCounter.Unlock()
varCounter.Lock()
if maxVariables != 0 && varCounter.count >= maxVariables {
panic(errMaxVariables)
panic(ErrMaxVariables)
}
varCounter.count++
return Variable(varCounter.count)
Expand Down

0 comments on commit 115d4be

Please sign in to comment.