From 6af886687e522e736616ce5969423cfbc2d3a924 Mon Sep 17 00:00:00 2001
From: Khushboo Verma <43381712+vermakhushboo@users.noreply.github.com>
Date: Fri, 19 Jul 2024 18:24:20 +0530
Subject: [PATCH] Add Go templates
---
app/config/functionTemplates.php | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/app/config/functionTemplates.php b/app/config/functionTemplates.php
index fff9735a94..d3ac7a2df7 100644
--- a/app/config/functionTemplates.php
+++ b/app/config/functionTemplates.php
@@ -24,6 +24,10 @@ const TEMPLATE_RUNTIMES = [
'BUN' => [
'name' => 'bun',
'versions' => ['1.0']
+ ],
+ 'GO' => [
+ 'name' => 'go',
+ 'versions' => ['1.22']
]
];
@@ -69,7 +73,8 @@ return [
'python/starter'
),
...getRuntimes(TEMPLATE_RUNTIMES['DART'], 'dart pub get', 'lib/main.dart', 'dart/starter'),
- ...getRuntimes(TEMPLATE_RUNTIMES['BUN'], 'bun install', 'src/main.ts', 'bun/starter')
+ ...getRuntimes(TEMPLATE_RUNTIMES['BUN'], 'bun install', 'src/main.ts', 'bun/starter'),
+ ...getRuntimes(TEMPLATE_RUNTIMES['GO'], 'go get', 'main.go', 'go/starter')
],
'instructions' => 'For documentation and instructions check out file.',
'vcsProvider' => 'github',
@@ -407,6 +412,12 @@ return [
'pip install -r requirements.txt && python src/setup.py',
'src/main.py',
'python/discord_command_bot'
+ ),
+ ...getRuntimes(
+ TEMPLATE_RUNTIMES['GO'],
+ 'go get',
+ 'main.go',
+ 'go/discord-command-bot'
)
],
'instructions' => 'For documentation and instructions check out file.',