We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fbd2f06 commit 5597701Copy full SHA for 5597701
src/prometheus/randomStrings.lua
@@ -1,11 +1,5 @@
1
-local Ast = require("prometheus.ast");
2
-
3
-local charset = {}
4
5
--- qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890
6
-for i = 48, 57 do table.insert(charset, string.char(i)) end
7
-for i = 65, 90 do table.insert(charset, string.char(i)) end
8
-for i = 97, 122 do table.insert(charset, string.char(i)) end
+local Ast, utils = require("prometheus.ast"), require("prometheus.util");
+local charset = utils.chararray("qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890")
9
10
local function randomString(wordsOrLen)
11
if type(wordsOrLen) == "table" then
@@ -27,4 +21,4 @@ end
27
21
return {
28
22
randomString = randomString,
29
23
randomStringNode = randomStringNode,
30
-}
24
+}
0 commit comments