Blob Blame History Raw
From 89e962d18b5d85cad8f6ee14c030aaccdcd89728 Mon Sep 17 00:00:00 2001
From: Ayke van Laethem <aykevanlaethem@gmail.com>
Date: Fri, 13 Jan 2023 20:02:54 +0100
Subject: [PATCH 23/26] runtime: implement internal/godebug.setUpdate as a stub

This function provides a mechanism to watch for changes to the GODEBUG
environment variable. For now, we'll not implement it. It might be
useful in the future, when it can always be added.

Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
 src/runtime/runtime.go | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/runtime/runtime.go b/src/runtime/runtime.go
index 4e24b923..c9df6939 100644
--- a/src/runtime/runtime.go
+++ b/src/runtime/runtime.go
@@ -87,3 +87,9 @@ func LockOSThread() {
 // Stub for now
 func UnlockOSThread() {
 }
+
+//go:linkname godebug_setUpdate internal/godebug.setUpdate
+func godebug_setUpdate(update func(string, string)) {
+	// Unimplemented. The 'update' function needs to be called whenever the
+	// GODEBUG environment variable changes (for example, via os.Setenv).
+}
-- 
2.38.1