Skip to content

Commit

Permalink
refactor: Use math.MaxInt64 const as MaxVersion instead of hardcode n…
Browse files Browse the repository at this point in the history
…umber (#441)

Signed-off-by: Sasha Melentyev <sasha@melentyev.io>

Signed-off-by: Sasha Melentyev <sasha@melentyev.io>
  • Loading branch information
sashamelentyev authored Jan 18, 2023
1 parent 1939e61 commit 81d44b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"io/fs"
"math"
"path"
"runtime"
"sort"
Expand All @@ -17,7 +18,7 @@ var (
// ErrNoNextVersion when the next migration version is not found.
ErrNoNextVersion = errors.New("no next version found")
// MaxVersion is the maximum allowed version.
MaxVersion int64 = 9223372036854775807 // max(int64)
MaxVersion int64 = math.MaxInt64

registeredGoMigrations = map[int64]*Migration{}
)
Expand Down

0 comments on commit 81d44b3

Please sign in to comment.