- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 44 for unsetEnv (0.12 sec)
-
src/cmd/vendor/golang.org/x/sys/plan9/env_plan9.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 15 19:02:39 UTC 2021 - 555 bytes - Viewed (0) -
src/runtime/env_test.go
t.Fatal(err) } if got := runtime.GOROOT(); got != want { t.Errorf(`after setenv runtime.GOROOT()=%q, want %q`, got, want) } if err := syscall.Unsetenv("GOROOT"); err != nil { t.Fatal(err) } if got := runtime.GOROOT(); got != want { t.Errorf(`after unsetenv runtime.GOROOT()=%q, want %q`, got, want) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 19 11:28:19 UTC 2020 - 1.2K bytes - Viewed (0) -
test/fixedbugs/issue36705.go
os.Setenv("FOO", "bar") s := C.GoString(C.getenv(C.CString("FOO"))) if s != "bar" { panic("bad setenv, environment variable only has value \"" + s + "\"") } os.Unsetenv("FOO") s = C.GoString(C.getenv(C.CString("FOO"))) if s != "" { panic("bad unsetenv, environment variable still has value \"" + s + "\"") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:25 UTC 2023 - 649 bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/sys/unix/env_unix.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:33 UTC 2023 - 645 bytes - Viewed (0) -
src/runtime/cgo/gcc_setenv.c
/* Stub for calling setenv */ void x_cgo_setenv(char **arg) { _cgo_tsan_acquire(); setenv(arg[0], arg[1], 1); _cgo_tsan_release(); } /* Stub for calling unsetenv */ void x_cgo_unsetenv(char **arg) { _cgo_tsan_acquire(); unsetenv(arg[0]); _cgo_tsan_release();
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 24 22:38:02 UTC 2023 - 487 bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/sys/windows/env_windows.go
env = append(env, UTF16ToString(entry)) block = (*uint16)(unsafe.Add(end, size)) } return env, nil } func Unsetenv(key string) error { return syscall.Unsetenv(key)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 08 20:35:26 UTC 2024 - 1.3K bytes - Viewed (0) -
src/cmd/dist/exec.go
} } // setEnv sets cmd.Env so that key = value. func setEnv(cmd *exec.Cmd, key, value string) { cmd.Env = append(cmd.Environ(), key+"="+value) } // unsetEnv sets cmd.Env so that key is not present in the environment. func unsetEnv(cmd *exec.Cmd, key string) { cmd.Env = cmd.Environ() prefix := key + "=" newEnv := []string{} for _, entry := range cmd.Env { if strings.HasPrefix(entry, prefix) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jul 20 21:52:09 UTC 2023 - 957 bytes - Viewed (0) -
src/os/env_test.go
} if err := Setenv(testKey, "1"); err != nil { t.Fatalf("Setenv: %v", err) } if !set() { t.Error("Setenv didn't set TestUnsetenv") } if err := Unsetenv(testKey); err != nil { t.Fatalf("Unsetenv: %v", err) } if set() { t.Fatal("Unsetenv didn't clear TestUnsetenv") } } func TestClearenv(t *testing.T) { const testKey = "GO_TEST_CLEARENV" const testValue = "1" // reset env
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jul 04 15:31:54 UTC 2023 - 5K bytes - Viewed (0) -
src/syscall/env_windows.go
} keyp, err := UTF16PtrFromString(key) if err != nil { return err } e := SetEnvironmentVariable(keyp, v) if e != nil { return e } runtimeSetenv(key, value) return nil } func Unsetenv(key string) error { keyp, err := UTF16PtrFromString(key) if err != nil { return err } e := SetEnvironmentVariable(keyp, nil) if e != nil { return e } runtimeUnsetenv(key) return nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jul 04 15:31:54 UTC 2023 - 2K bytes - Viewed (0) -
src/os/env.go
func Setenv(key, value string) error { err := syscall.Setenv(key, value) if err != nil { return NewSyscallError("setenv", err) } return nil } // Unsetenv unsets a single environment variable. func Unsetenv(key string) error { return syscall.Unsetenv(key) } // Clearenv deletes all environment variables. func Clearenv() { syscall.Clearenv() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 21:33:12 UTC 2024 - 3.9K bytes - Viewed (0)