From 95bae8af09e85f9d4400dcc70e70218f6cb8970b Mon Sep 17 00:00:00 2001 From: mediocregopher Date: Tue, 26 Sep 2023 11:11:40 +0200 Subject: [PATCH] Fix go-playground --- bin/go-playground | 45 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/bin/go-playground b/bin/go-playground index 64633a9..b1b9661 100755 --- a/bin/go-playground +++ b/bin/go-playground @@ -1,5 +1,42 @@ #!/bin/sh -cd "$(mktemp -d)"; -go mod init local-playground; -echo 'package main\n\nimport (\n\t"fmt"\n)\n\nfunc main() {\n\tfmt.Println("aloha")\n}\n' > main.go; -$EDITOR main.go; + +set -e -x + +cd "$(mktemp -d)" + +cat >main.go <shell.nix <