- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 24 for unsetEnv (0.14 sec)
-
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/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/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) -
cmd/update_test.go
} if !strings.Contains(str, expectedStr) { t.Errorf("Test %d: expected: %s, got: %s", i+1, expectedStr, str) } globalIsCICD = sci os.Unsetenv("MARATHON_APP_LABEL_DCOS_PACKAGE_VERSION") os.Unsetenv(testCase.envName) } } // Tests if the environment we are running is in DCOS. func TestIsDCOS(t *testing.T) { sci := globalIsCICD globalIsCICD = false defer func() {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Sat Mar 09 03:07:08 UTC 2024 - 10.7K bytes - Viewed (0) -
src/cmd/go/internal/toolchain/exec.go
// The GOROOT directory is empty if we are invoking a command named // gotoolchain found in $PATH. func execGoToolchain(gotoolchain, dir, exe string) { os.Setenv(targetEnv, gotoolchain) if dir == "" { os.Unsetenv("GOROOT") } else { os.Setenv("GOROOT", dir) } // On Windows, there is no syscall.Exec, so the best we can do // is run a subprocess and exit with the same status.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Dec 19 14:42:39 UTC 2023 - 1.6K bytes - Viewed (0) -
pkg/test/util.go
if err := os.Setenv(k, v); err != nil { t.Fatal(err) } t.Cleanup(func() { if oldset { if err := os.Setenv(k, old); err != nil { t.Fatal(err) } } else { if err := os.Unsetenv(k); err != nil { t.Fatal(err) } } }) } // SetAtomicBoolForTest sets a variable for the duration of a test, then resets it once the test is complete atomically.
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Jan 05 01:20:59 UTC 2024 - 1.9K bytes - Viewed (0) -
platforms/core-runtime/native/src/main/java/org/gradle/internal/nativeintegration/ReflectiveEnvironment.java
import java.lang.reflect.Field; import java.util.Map; /** * Uses reflection to update private environment state */ public class ReflectiveEnvironment { public void unsetenv(String name) { Map<String, String> map = getEnv(); map.remove(name); if (OperatingSystem.current().isWindows()) { Map<String, String> env2 = getWindowsEnv(); env2.remove(name);
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 09:06:40 UTC 2023 - 2.7K bytes - Viewed (0) -
platforms/core-runtime/native/src/main/java/org/gradle/internal/nativeintegration/processenvironment/AbstractProcessEnvironment.java
} @Override public void removeEnvironmentVariable(String name) throws NativeIntegrationException { removeNativeEnvironmentVariable(name); reflectiveEnvironment.unsetenv(name); } protected abstract void removeNativeEnvironmentVariable(String name); @Override public EnvironmentModificationResult maybeRemoveEnvironmentVariable(String name) {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Oct 05 19:36:14 UTC 2023 - 3.6K bytes - Viewed (0) -
internal/kms/config.go
if isPresent(EnvKMSSecretKey) && os.Getenv(EnvKMSSecretKey) == "" { os.Unsetenv(EnvKMSSecretKey) } if isPresent(EnvKMSSecretKeyFile) { if filename := os.Getenv(EnvKMSSecretKeyFile); filename == "" { os.Unsetenv(EnvKMSSecretKeyFile) } else if _, err := os.Stat(filename); errors.Is(err, os.ErrNotExist) { os.Unsetenv(EnvKMSSecretKeyFile) } }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Wed Jun 12 14:31:26 UTC 2024 - 13.9K bytes - Viewed (0)