Is Go supported as language option when using custom json?
sheldonhull opened this issue · 2 comments
I'm attempting to use the direction from the wiki for adding a new language, but everytime I try to add Go to this the solution loads in C++.
I've restarted vscode, made sure to refresh the page, and even removed the default language json config files from the .acmx/languages
directory, but nothing changes.
I'm trying to use competitive-companion to send the Go problems to Vscode. I'm using this for better Hackerrank integration to allow me to using my normal Vscode setup to practice puzzles/algorithm concepts, but haven't been able to get any tooling to recognize Go so far.
Any tips on what might be happening? I'm assuming it's acmx that picks the language and solution and not the browser extension. Even if it is the browser extension, I've ensured Go is loaded, so not sure why it wouldn't send the right information over.
{
"prerun": [
"go",
"build",
"$CODE",
"-o",
"$OUTPUT"
],
"run": [
"$OUTPUT"
],
"ext": "go"
}
In further reading, I'm thinking it might be that I need a template structure to support the new language otherwise it defaults to C++.
The docs are a bit unclear to me on what I'd need. I'm guessing that the problem statement provided by HackerRank isn't accessible in this, and my template is what has to be used?
For instance, problem statement includes the read/write for std in and out and then the placeholder for parsing this in the main.go
file. Is the competitive helper + acmx supposed to download that or just the test cases?
@sheldonhull as you noticed the language is detected from the extension of the main solution, in your case main.go
. For the moment competitive-companion doesn't expose placeholder code (template) from hackerrank and I think it is out of the scope of that project, so you will need to copy-paste that code into your template to start coding.