From 6d283cb3df4f43895288e921dd679f19b18cd3e5 Mon Sep 17 00:00:00 2001 From: Dim Date: Wed, 13 Mar 2019 00:37:09 -0400 Subject: [PATCH] Add Golang --- docker/go/Dockerfile | 5 +++++ docker/go/run.sh | 2 ++ src/commands/help.js | 1 + src/languages/go.js | 12 ++++++++++++ 4 files changed, 20 insertions(+) create mode 100644 docker/go/Dockerfile create mode 100644 docker/go/run.sh create mode 100644 src/languages/go.js diff --git a/docker/go/Dockerfile b/docker/go/Dockerfile new file mode 100644 index 0000000..5ddd8dd --- /dev/null +++ b/docker/go/Dockerfile @@ -0,0 +1,5 @@ +FROM golang:alpine +LABEL author="1Computer1" + +COPY run.sh /var/run/ +WORKDIR /var/ws diff --git a/docker/go/run.sh b/docker/go/run.sh new file mode 100644 index 0000000..0e12614 --- /dev/null +++ b/docker/go/run.sh @@ -0,0 +1,2 @@ +echo "$1" > program.go +go run program.go diff --git a/src/commands/help.js b/src/commands/help.js index bce5de6..da2700c 100644 --- a/src/commands/help.js +++ b/src/commands/help.js @@ -31,6 +31,7 @@ class HelpCommand extends Command { '- JavaScript', '- Python', '- Haskell', + '- Go', '', 'Read the readme for more information: ' ]); diff --git a/src/languages/go.js b/src/languages/go.js new file mode 100644 index 0000000..f8c8d4d --- /dev/null +++ b/src/languages/go.js @@ -0,0 +1,12 @@ +const Language = require('../struct/Language'); + +class Go extends Language { + constructor() { + super('go', { + highlight: 'go', + aliases: ['go'] + }); + } +} + +module.exports = Go;