Skip to content
Snippets Groups Projects
Commit 930b0781 authored by Aleksander Einarsen's avatar Aleksander Einarsen
Browse files

Marked as deprecated, fixed a code typo for dependencies

parent ba68246c
No related branches found
No related tags found
No related merge requests found
......@@ -5,13 +5,15 @@ import (
"runtime"
)
// Deprecated: Use `go_compiler_v2.NewGoCompiler` instead
//
// CompileStringToGo tries to compile a string of go code to a go executable, and returns the compiler output and an error.
// The function does not produce any executables, since they are deleted after the function ends.
func CompileStringToGo(code string, filename string, dependencies ...string) (string, error) {
func CompileStringToGo(code string, filename string, _ ...string) (string, error) {
// Get the platform
OS := runtime.GOOS
// SetupEnvironment
return compiler.InitCompiler(compiler.OS(OS), compiler.Go, code, filename, dependencies...).Compile()
return compiler.InitCompiler(compiler.OS(OS), compiler.Go, code, filename).Compile()
}
......@@ -5,6 +5,8 @@ import (
"runtime"
)
// Deprecated: Use `rust_compiler_v2.NewRustCompiler` instead
//
// CompileStringToRust compiles a string of go code to a rust executable
func CompileStringToRust(code string, filename string, dependencies ...string) (string, error) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment