diff --git a/packages/go/1.16.2/1.20.3/build.sh b/packages/go/1.16.2/1.20.3/build.sh new file mode 100644 index 0000000..7409e38 --- /dev/null +++ b/packages/go/1.16.2/1.20.3/build.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +curl -LO https://golang.org/dl/go1.20.3.linux-amd64.tar.gz +tar -xzf go1.20.3.linux-amd64.tar.gz +rm go1.20.3.linux-amd64.tar.gz diff --git a/packages/go/1.16.2/1.20.3/compile b/packages/go/1.16.2/1.20.3/compile new file mode 100644 index 0000000..c4b591a --- /dev/null +++ b/packages/go/1.16.2/1.20.3/compile @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +# https://stackoverflow.com/questions/38041331/rust-compiler-cant-find-crate-for-std +# Rust compiler needs to find the stdlib to link against +rustc -o binary -L ${RUST_INSTALL_LOC}/rustc/lib -L ${RUST_INSTALL_LOC}/rust-std-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib "$@" +chmod +x binary \ No newline at end of file diff --git a/packages/go/1.16.2/1.20.3/environment b/packages/go/1.16.2/1.20.3/environment new file mode 100644 index 0000000..1788638 --- /dev/null +++ b/packages/go/1.16.2/1.20.3/environment @@ -0,0 +1,2 @@ +export PATH=$PWD/go/bin:$PATH +export GOPATH=$PWD/gopath \ No newline at end of file diff --git a/packages/go/1.16.2/1.20.3/metadata.json b/packages/go/1.16.2/1.20.3/metadata.json new file mode 100644 index 0000000..cc82143 --- /dev/null +++ b/packages/go/1.16.2/1.20.3/metadata.json @@ -0,0 +1,5 @@ +{ + "language": "go", + "version": "1.20.3", + "aliases": ["go", "golang"] +} \ No newline at end of file diff --git a/packages/go/1.16.2/1.20.3/run b/packages/go/1.16.2/1.20.3/run new file mode 100644 index 0000000..b0c81a9 --- /dev/null +++ b/packages/go/1.16.2/1.20.3/run @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +mv $1 $1.go +#filename=$1.go +filename=*.go +shift +GOCACHE=$PWD go run $filename "$@" \ No newline at end of file diff --git a/packages/go/1.16.2/1.20.3/test.go b/packages/go/1.16.2/1.20.3/test.go new file mode 100644 index 0000000..455bc8d --- /dev/null +++ b/packages/go/1.16.2/1.20.3/test.go @@ -0,0 +1,7 @@ +package main + +import "fmt" + +func main() { + fmt.Println("OK") +} \ No newline at end of file