Initial commit of Descrybe v2 without local scratch artifacts.
Drop one-shot tmp/axe scripts and agent i18n scratch so the Gitea tree is deployable.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
|
||||
const root = path.resolve("apps/api/internal/httpapi");
|
||||
const msgs = new Set();
|
||||
function walk(dir) {
|
||||
for (const ent of fs.readdirSync(dir, { withFileTypes: true })) {
|
||||
const p = path.join(dir, ent.name);
|
||||
if (ent.isDirectory()) walk(p);
|
||||
else if (ent.name.endsWith(".go")) {
|
||||
const s = fs.readFileSync(p, "utf8");
|
||||
for (const m of s.matchAll(/Error\(w,\s*http\.Status\w+,\s*"([^"]+)"/g)) {
|
||||
msgs.add(m[1]);
|
||||
}
|
||||
for (const m of s.matchAll(/CodedError\(w,\s*http\.Status\w+,\s*"[^"]+",\s*"([^"]+)"/g)) {
|
||||
msgs.add(m[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
walk(root);
|
||||
console.log([...msgs].sort().join("\n"));
|
||||
console.log("COUNT", msgs.size);
|
||||
Reference in New Issue
Block a user