]> Cypherpunks.ru repositories - gostls13.git/commit
internal/godebug: remove dependency on os
authorRuss Cox <rsc@golang.org>
Mon, 17 Oct 2022 19:34:50 +0000 (15:34 -0400)
committerGopher Robot <gobot@golang.org>
Tue, 18 Oct 2022 14:49:44 +0000 (14:49 +0000)
commit8dc08394f0d5f83523080e4dd99fded26b7c1ceb
tree06dc72d439c842aea68df4834e1310ac207fade7
parent9fedc481ea09a0539cd2669312429ef5416a8949
internal/godebug: remove dependency on os

The immediate reason is that we want to use godebug from math/rand,
and math/rand importing godebug importing os causes an import cycle
in package testing.

More generally, the new approach to backward compatibility outlined
in discussion #55090 will require using this package from other similarly
sensitive places, perhaps even package os itself. Best to remove all
dependencies.

Preparation for #54880.

Change-Id: Ia01657a2d90e707a8121a336c9db3b7247c0198f
Reviewed-on: https://go-review.googlesource.com/c/go/+/439418
Auto-Submit: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/go/build/deps_test.go
src/internal/godebug/export_test.go [new file with mode: 0644]
src/internal/godebug/godebug.go
src/internal/godebug/godebug_test.go
src/runtime/env_posix.go
src/runtime/runtime.go
src/runtime/runtime1.go
src/syscall/env_unix.go
src/syscall/env_windows.go
src/syscall/syscall.go