Skip to content

Commit

Permalink
Merge pull request #4 from mikeleppane/fix/namings-frontend
Browse files Browse the repository at this point in the history
fix/namings: changed GO => Go
  • Loading branch information
mikeleppane authored Dec 20, 2021
2 parents c849b42 + 29da6ec commit 7c19152
Show file tree
Hide file tree
Showing 19 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion backend/src/docker/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion backend/src/routes/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
2 changes: 1 addition & 1 deletion backend/src/routes/format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down
2 changes: 1 addition & 1 deletion backend/src/routes/lint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down
2 changes: 1 addition & 1 deletion backend/src/routes/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down
2 changes: 1 addition & 1 deletion backend/src/routes/testing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down
4 changes: 2 additions & 2 deletions backend/src/tests/integration/info_route.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion backend/src/tests/unit/commands.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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", () => {
Expand Down
2 changes: 1 addition & 1 deletion backend/src/tests/unit/validators.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion backend/src/utils/route_helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
);
}
Expand Down
4 changes: 2 additions & 2 deletions frontend/cypress/integration/go-explorer-app.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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 });
});
});
2 changes: 1 addition & 1 deletion frontend/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
-->
<title>GO Explorer</title>
<title>Go Explorer</title>
</head>
<body style="margin: 0;background-color: #171421">
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/AppBar/About.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function About() {

return (
<div>
<Tooltip title="About GO Explorer">
<Tooltip title="About Go Explorer">
<IconButton
id="open-about"
sx={{
Expand Down Expand Up @@ -50,7 +50,7 @@ export default function About() {
variant="h3"
sx={{ fontWeight: 500 }}
>
GO Explorer
Go Explorer
</Typography>
<Typography
id="modal-modal-description"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/AppBar/AppBarTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function AppTitle() {
lineHeight: "22px",
}}
>
GO <br />
Go <br />
Explorer
</Typography>
</Box>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/AppBar/BuildCodeMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => (
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/AppBar/RunCodeMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => (
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/AppBar/ShowEnvInfoMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default function ShowEnvInfoMenu() {

return (
<div>
<Tooltip title="Show info about GO environment variables and used CPU architecture">
<Tooltip title="Show info about Go environment variables and used CPU architecture">
<IconButton
id="open-env-info-button"
sx={{
Expand Down Expand Up @@ -86,7 +86,7 @@ export default function ShowEnvInfoMenu() {
SelectProps={{
native: true,
}}
helperText="Select the GO version"
helperText="Select the Go version"
variant="standard"
>
{versions.map((version) => (
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/AppBar/TestCodeMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => (
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/config/codeTemplates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 7c19152

Please sign in to comment.