From 29da6ecd681ca59e33df8c40594bae08a993cd3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikko=20Lepp=C3=A4nen?= Date: Mon, 20 Dec 2021 16:44:03 +0200 Subject: [PATCH] fix/namings: changed GO => Go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mikko Leppänen --- backend/src/docker/commands.ts | 2 +- backend/src/routes/build.ts | 2 +- backend/src/routes/format.ts | 2 +- backend/src/routes/lint.ts | 2 +- backend/src/routes/run.ts | 2 +- backend/src/routes/testing.ts | 2 +- backend/src/tests/integration/info_route.test.ts | 4 ++-- backend/src/tests/unit/commands.test.ts | 2 +- backend/src/tests/unit/validators.test.ts | 2 +- backend/src/utils/route_helpers.ts | 2 +- frontend/cypress/integration/go-explorer-app.spec.ts | 4 ++-- frontend/public/index.html | 2 +- frontend/src/components/AppBar/About.tsx | 4 ++-- frontend/src/components/AppBar/AppBarTitle.tsx | 2 +- frontend/src/components/AppBar/BuildCodeMenu.tsx | 2 +- frontend/src/components/AppBar/RunCodeMenu.tsx | 2 +- frontend/src/components/AppBar/ShowEnvInfoMenu.tsx | 4 ++-- frontend/src/components/AppBar/TestCodeMenu.tsx | 2 +- frontend/src/config/codeTemplates.ts | 2 +- 19 files changed, 23 insertions(+), 23 deletions(-) diff --git a/backend/src/docker/commands.ts b/backend/src/docker/commands.ts index 38e79fb..5021794 100644 --- a/backend/src/docker/commands.ts +++ b/backend/src/docker/commands.ts @@ -25,7 +25,7 @@ const golangImage = (version: string) => { export const envInfo = (version: string) => { return `${dockerBaseCommand} ${golangImage( version - )} bash -c "echo '====GO ENVS====';go env && echo '\n====CPU ARCH===='; lscpu"`; + )} bash -c "echo '====Go ENVS====';go env && echo '\n====CPU ARCH===='; lscpu"`; }; export const formatCode = (filePath: string, version: string) => { diff --git a/backend/src/routes/build.ts b/backend/src/routes/build.ts index 75115bb..cb321c4 100644 --- a/backend/src/routes/build.ts +++ b/backend/src/routes/build.ts @@ -54,7 +54,7 @@ buildRouter.post("/", async (req, res) => { const isObjectDumpRequested = req.query.objdump === "true"; const requestEntries = parseRequestEntries(body); let tempFile = ""; - logger.info(`Code building started with GO version ${version}.`); + logger.info(`Code building started with Go version ${version}.`); try { tempFile = await createTempFile(); await handleCodeBuildTask({ diff --git a/backend/src/routes/format.ts b/backend/src/routes/format.ts index c9db80b..f3e7939 100644 --- a/backend/src/routes/format.ts +++ b/backend/src/routes/format.ts @@ -36,7 +36,7 @@ formatRouter.post("/", async (req, res) => { return; } let tempFile = ""; - logger.info(`Code formatting started with GO version ${version}.`); + logger.info(`Code formatting started with Go version ${version}.`); try { tempFile = await createTempFile(); await handleCodeFormatTask({ tempFile, code: body.code, version, res }); diff --git a/backend/src/routes/lint.ts b/backend/src/routes/lint.ts index ffe7da3..a5c03eb 100644 --- a/backend/src/routes/lint.ts +++ b/backend/src/routes/lint.ts @@ -51,7 +51,7 @@ lintRouter.post("/", async (req, res) => { return; } let tempFile = ""; - logger.info(`Linting operation started with GO version ${version}.`); + logger.info(`Linting operation started with Go version ${version}.`); try { tempFile = await createTempFile(); await handleCodeLintTask({ tempFile, code: body.code, version, res }); diff --git a/backend/src/routes/run.ts b/backend/src/routes/run.ts index 5532a12..ce94046 100644 --- a/backend/src/routes/run.ts +++ b/backend/src/routes/run.ts @@ -51,7 +51,7 @@ runRouter.post("/", async (req, res) => { } const requestEntries = parseRequestEntries(body); let tempFile = ""; - logger.info(`Code execution started with GO version ${version}.`); + logger.info(`Code execution started with Go version ${version}.`); try { tempFile = await createTempFile(); await handleCodeRunTask({ tempFile, requestEntries, version, res }); diff --git a/backend/src/routes/testing.ts b/backend/src/routes/testing.ts index 930f4f4..036121a 100644 --- a/backend/src/routes/testing.ts +++ b/backend/src/routes/testing.ts @@ -40,7 +40,7 @@ testingRouter.post("/", async (req, res) => { } const requestEntries = parseRequestEntries(body); let tempFile = ""; - logger.info(`Code testing started with GO version ${version}.`); + logger.info(`Code testing started with Go version ${version}.`); try { tempFile = await createTempFile("go-", "", "_test.go"); await handleCodeTestTask({ tempFile, requestEntries, version, res }); diff --git a/backend/src/tests/integration/info_route.test.ts b/backend/src/tests/integration/info_route.test.ts index 97d3516..066ee25 100644 --- a/backend/src/tests/integration/info_route.test.ts +++ b/backend/src/tests/integration/info_route.test.ts @@ -10,12 +10,12 @@ describe("GET /api/info", () => { test("should return used environment variables for default version", async () => { const response = await api.get("/api/info").expect(200); expect(response.text).toContain("go1.17"); - expect(response.text).toContain("====GO ENVS===="); + expect(response.text).toContain("====Go ENVS===="); expect(response.text).toContain("====CPU ARCH===="); }); test("should return 400 error if given version is not valid", async () => { const response = await api.get("/api/info?version=0.12345").expect(400); - expect(response.text).toContain("No should GO version available"); + expect(response.text).toContain("No such Go version available"); }); test("should return used environment variables for given version", async () => { const response = await api.get("/api/info?version=1.17").expect(200); diff --git a/backend/src/tests/unit/commands.test.ts b/backend/src/tests/unit/commands.test.ts index e0e9c83..f4496d4 100644 --- a/backend/src/tests/unit/commands.test.ts +++ b/backend/src/tests/unit/commands.test.ts @@ -13,7 +13,7 @@ describe("Commands executed inside Docker container", () => { const version = "1.17"; const command = envInfo(version); expect(command).toBe( - `docker run --rm golang:${version} bash -c "echo '====GO ENVS====';go env && echo '\n====CPU ARCH===='; lscpu"` + `docker run --rm golang:${version} bash -c "echo '====Go ENVS====';go env && echo '\n====CPU ARCH===='; lscpu"` ); }); test("formatCode should return correct command", () => { diff --git a/backend/src/tests/unit/validators.test.ts b/backend/src/tests/unit/validators.test.ts index e7a3cac..2404ad6 100644 --- a/backend/src/tests/unit/validators.test.ts +++ b/backend/src/tests/unit/validators.test.ts @@ -14,7 +14,7 @@ describe("buildValidator", () => { const { error } = validateBuildRequest(buildData); expect(error).toBeUndefined(); }); - test("Validator should accept development version of GO", () => { + test("Validator should accept development version of Go", () => { const buildData = { code: "some code", version: "1.18rc", diff --git a/backend/src/utils/route_helpers.ts b/backend/src/utils/route_helpers.ts index 2d52804..127a774 100644 --- a/backend/src/utils/route_helpers.ts +++ b/backend/src/utils/route_helpers.ts @@ -36,7 +36,7 @@ export const validateVersion = (qsVersion: unknown, res: express.Response) => { version = getVersion(validateQsVersion(qsVersion)); if (!version) { res.status(400).send( - `No should GO version available: ${qsVersion}. + `No such Go version available: ${qsVersion}. Currently available version are: ${availableVersions}` ); } diff --git a/frontend/cypress/integration/go-explorer-app.spec.ts b/frontend/cypress/integration/go-explorer-app.spec.ts index ee47c31..965cf5b 100644 --- a/frontend/cypress/integration/go-explorer-app.spec.ts +++ b/frontend/cypress/integration/go-explorer-app.spec.ts @@ -13,7 +13,7 @@ describe("Go Explorer App ", function () { }); it("user can open about", function () { cy.get("#open-about").click(); - cy.get("#about").contains("GO Explorer"); + cy.get("#about").contains("Go Explorer"); }); it("user can load new template to editor", function () { cy.get("#open-file-button").click(); @@ -44,7 +44,7 @@ describe("Go Explorer App ", function () { matchCase: false, } ); - cy.get("#result-view").contains("GO ENVS", { timeout: 5000 }); + cy.get("#result-view").contains("Go ENVS", { timeout: 5000 }); cy.get("#result-view").contains("CPU ARCH", { timeout: 5000 }); }); }); diff --git a/frontend/public/index.html b/frontend/public/index.html index 06a68c3..afcc33d 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -30,7 +30,7 @@ work correctly both with client-side routing and a non-root public URL. Learn how to configure a non-root public URL by running `npm run build`. --> - GO Explorer + Go Explorer diff --git a/frontend/src/components/AppBar/About.tsx b/frontend/src/components/AppBar/About.tsx index 9d6a260..fa1ecc9 100644 --- a/frontend/src/components/AppBar/About.tsx +++ b/frontend/src/components/AppBar/About.tsx @@ -9,7 +9,7 @@ export default function About() { return (
- + - GO Explorer + Go Explorer - GO
+ Go
Explorer
diff --git a/frontend/src/components/AppBar/BuildCodeMenu.tsx b/frontend/src/components/AppBar/BuildCodeMenu.tsx index 2ddab74..2d925ae 100644 --- a/frontend/src/components/AppBar/BuildCodeMenu.tsx +++ b/frontend/src/components/AppBar/BuildCodeMenu.tsx @@ -298,7 +298,7 @@ export default function BuildCodeMenu() { SelectProps={{ native: true, }} - helperText="Select the GO version" + helperText="Select the Go version" variant="standard" > {versions.map((version) => ( diff --git a/frontend/src/components/AppBar/RunCodeMenu.tsx b/frontend/src/components/AppBar/RunCodeMenu.tsx index ed30d8d..11dbf9c 100644 --- a/frontend/src/components/AppBar/RunCodeMenu.tsx +++ b/frontend/src/components/AppBar/RunCodeMenu.tsx @@ -182,7 +182,7 @@ export default function RunCodeMenu() { SelectProps={{ native: true, }} - helperText="Select the GO version" + helperText="Select the Go version" variant="standard" > {versions.map((version) => ( diff --git a/frontend/src/components/AppBar/ShowEnvInfoMenu.tsx b/frontend/src/components/AppBar/ShowEnvInfoMenu.tsx index df61d9f..c2301aa 100644 --- a/frontend/src/components/AppBar/ShowEnvInfoMenu.tsx +++ b/frontend/src/components/AppBar/ShowEnvInfoMenu.tsx @@ -42,7 +42,7 @@ export default function ShowEnvInfoMenu() { return (
- + {versions.map((version) => ( diff --git a/frontend/src/components/AppBar/TestCodeMenu.tsx b/frontend/src/components/AppBar/TestCodeMenu.tsx index 9499bd8..5b5c465 100644 --- a/frontend/src/components/AppBar/TestCodeMenu.tsx +++ b/frontend/src/components/AppBar/TestCodeMenu.tsx @@ -210,7 +210,7 @@ export default function TestCodeMenu() { SelectProps={{ native: true, }} - helperText="Select the GO version" + helperText="Select the Go version" variant="standard" > {versions.map((version) => ( diff --git a/frontend/src/config/codeTemplates.ts b/frontend/src/config/codeTemplates.ts index 5edec81..21bd5ee 100644 --- a/frontend/src/config/codeTemplates.ts +++ b/frontend/src/config/codeTemplates.ts @@ -75,7 +75,7 @@ func main() { `; export const genericsCode = ` -// Remember to choose GO 1.18 version when trying this. +// Remember to choose Go 1.18 version when trying this. package main import (