From 977bc6f813af032b7499f7876a963e6d3f20b685 Mon Sep 17 00:00:00 2001 From: Ryotaro Banno Date: Mon, 11 Mar 2024 09:45:24 +0900 Subject: [PATCH] fix typo in core_dsl.go --- core_dsl.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core_dsl.go b/core_dsl.go index 0e633f309..a3e8237e9 100644 --- a/core_dsl.go +++ b/core_dsl.go @@ -792,8 +792,8 @@ DeferCleanup can be passed: For example: BeforeEach(func() { - DeferCleanup(os.SetEnv, "FOO", os.GetEnv("FOO")) - os.SetEnv("FOO", "BAR") + DeferCleanup(os.Setenv, "FOO", os.GetEnv("FOO")) + os.Setenv("FOO", "BAR") }) will register a cleanup handler that will set the environment variable "FOO" to its current value (obtained by os.GetEnv("FOO")) after the spec runs and then sets the environment variable "FOO" to "BAR" for the current spec.