Initialize Go code

Set up main.go and go.mod and hook up the testing script.

Change-Id: Ief24007182fc8575bf7e39b63c5e59b6544463f8
Reviewed-on: https://fuchsia-review.googlesource.com/c/shac-project/shac/+/820049
Reviewed-by: Marc-Antoine Ruel <maruel@google.com>
Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com>
Fuchsia-Auto-Submit: Oliver Newman <olivernewman@google.com>
Commit-Queue: Marc-Antoine Ruel <maruel@google.com>
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..edf4f7b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+# Tools installed from CIPD.
+/.tools
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..d4a6e7e
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,3 @@
+module go.fuchsia.dev/shac-project/shac
+
+go 1.20
diff --git a/main.go b/main.go
new file mode 100644
index 0000000..670c88e
--- /dev/null
+++ b/main.go
@@ -0,0 +1,13 @@
+// Copyright 2023 The Fuchsia Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+	"fmt"
+)
+
+func main() {
+	fmt.Println("hello world!")
+}
diff --git a/scripts/tests.sh b/scripts/tests.sh
index b9f8656..896e647 100755
--- a/scripts/tests.sh
+++ b/scripts/tests.sh
@@ -5,5 +5,19 @@
 
 set -eu -o pipefail
 
-# TODO(olivernewman): Actually run tests once there are tests to run.
-echo "No tests run."
+REPO_ROOT="$(dirname "$(dirname "${BASH_SOURCE[0]}")")"
+
+GO=go
+
+# Install Go using CIPD if it's not on $PATH.
+if ! command -v "$GO" > /dev/null; then
+  CIPD_ROOT="$REPO_ROOT/.tools"
+  if [ ! -d "$CIPD_ROOT" ]; then
+    echo "Installing Go from CIPD..."
+    cipd init -force "$CIPD_ROOT"
+    cipd install -log-level error -root "$CIPD_ROOT" 'infra/3pp/tools/go/${platform}'
+  fi
+  GO="$CIPD_ROOT/bin/go"
+fi
+
+"$GO" test "$REPO_ROOT/..."