Skip to content

Commit

Permalink
VER_PREFIX_LEN
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed Jan 14, 2025
1 parent 919c2d5 commit 09d5bc4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kong/clustering/services/sync/strategies/postgres.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ local ngx_null = ngx.null

-- version string should look like: "v02_0000"
local VER_PREFIX = "v02_"
local VER_PREFIX_LEN = #VER_PREFIX
local VERSION_FMT = VER_PREFIX .. "%028x"


Expand Down Expand Up @@ -59,7 +60,7 @@ end


function _M:is_valid_version(str)
return sub(str, 1, 4) == VER_PREFIX
return sub(str, 1, VER_PREFIX_LEN) == VER_PREFIX
end


Expand Down

0 comments on commit 09d5bc4

Please sign in to comment.