From 82d0d70ba256320e3c50fea500084f0744b0bbb3 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Thu, 30 Aug 2018 05:41:48 +0200 Subject: [PATCH] Add (hardcoded) runtime.GOROOT() Necessary for the time package. --- src/runtime/runtime.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/runtime/runtime.go b/src/runtime/runtime.go index cbc36ceb..ea59c60b 100644 --- a/src/runtime/runtime.go +++ b/src/runtime/runtime.go @@ -21,6 +21,11 @@ func GOMAXPROCS(n int) int { return 1 } +func GOROOT() string { + // TODO: don't hardcode but take the one at compile time. + return "/usr/local/go" +} + // Copy size bytes from src to dst. The memory areas must not overlap. func memcpy(dst, src unsafe.Pointer, size uintptr) { for i := uintptr(0); i < size; i++ {