Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 99 for setenv (0.2 sec)

  1. internal/config/subnet/config.go

    func (c *Config) ApplyEnv() {
    	configLock.RLock()
    	defer configLock.RUnlock()
    
    	if c.License != "" {
    		os.Setenv("CONSOLE_SUBNET_LICENSE", c.License)
    	}
    	if c.APIKey != "" {
    		os.Setenv("CONSOLE_SUBNET_API_KEY", c.APIKey)
    	}
    	if c.Proxy != "" {
    		os.Setenv("CONSOLE_SUBNET_PROXY", c.Proxy)
    	}
    	os.Setenv("CONSOLE_SUBNET_URL", c.BaseURL)
    }
    
    // Update - in-place update with new license and registration information.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Nov 24 17:59:35 GMT 2023
    - 3.8K bytes
    - Viewed (0)
  2. cmd/common-main.go

    		isprel := globalBrowserConfig.IsHSTSPreload()
    		os.Setenv("CONSOLE_SECURE_STS_SECONDS", strconv.Itoa(hstsSeconds))
    		os.Setenv("CONSOLE_SECURE_STS_INCLUDE_SUB_DOMAINS", isubdom)
    		os.Setenv("CONSOLE_SECURE_STS_PRELOAD", isprel)
    	}
    
    	if valueRefer := globalBrowserConfig.GetReferPolicy(); valueRefer != "" {
    		os.Setenv("CONSOLE_SECURE_REFERRER_POLICY", valueRefer)
    	}
    
    	globalSubnetConfig.ApplyEnv()
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat May 04 00:17:57 GMT 2024
    - 35.8K bytes
    - Viewed (2)
  3. cmd/update_test.go

    		}
    		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() {
    		globalIsCICD = sci
    	}()
    
    	t.Setenv("MESOS_CONTAINER_NAME", "mesos-1111")
    	dcos := IsDCOS()
    	if !dcos {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Mar 09 03:07:08 GMT 2024
    - 10.7K bytes
    - Viewed (0)
  4. cni/test/install_cni.go

          "cni_bin_dir": "/opt/cni/bin",
          "exclude_namespaces": [ "istio-system" ]
      }
    }
    `
    )
    
    func getEnv(key, fallback string) string {
    	if value, ok := os.LookupEnv(key); ok {
    		return value
    	}
    	return fallback
    }
    
    func setEnv(key, value string, t *testing.T) {
    	t.Helper()
    	err := os.Setenv(key, value)
    	if err != nil {
    		t.Fatalf("Couldn't set environment variable, err: %v", err)
    	}
    }
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  5. src/cmd/addr2line/addr2line_test.go

    package main
    
    import (
    	"bufio"
    	"bytes"
    	"internal/testenv"
    	"os"
    	"path/filepath"
    	"runtime"
    	"strings"
    	"sync"
    	"testing"
    )
    
    // TestMain executes the test binary as the addr2line command if
    // GO_ADDR2LINETEST_IS_ADDR2LINE is set, and runs the tests otherwise.
    func TestMain(m *testing.M) {
    	if os.Getenv("GO_ADDR2LINETEST_IS_ADDR2LINE") != "" {
    		main()
    		os.Exit(0)
    	}
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Feb 21 22:16:54 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  6. src/archive/zip/reader_test.go

    			continue
    		}
    		if got := fi.ModTime(); !got.Equal(test.want) {
    			t.Errorf("%s: got modtime %v, want %v", test.name, got, test.want)
    		}
    	}
    }
    
    func TestCVE202127919(t *testing.T) {
    	t.Setenv("GODEBUG", "zipinsecurepath=0")
    	// Archive containing only the file "../test.txt"
    	data := []byte{
    		0x50, 0x4b, 0x03, 0x04, 0x14, 0x00, 0x08, 0x00,
    		0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Mar 27 18:23:49 GMT 2024
    - 55.3K bytes
    - Viewed (0)
  7. cni/pkg/plugin/plugin_dryrun_test.go

    			outputFilePath := filepath.Join(tmpDir, "output.txt")
    			if _, err := os.Create(outputFilePath); err != nil {
    				t.Fatalf("Failed to create temp file for IPTables rule output: %v", err)
    			}
    			t.Setenv(dependencies.DryRunFilePath.Name, outputFilePath)
    
    			pod := buildFakeDryRunPod()
    			pod.ObjectMeta.Annotations = tt.annotations
    			pod.Spec.Containers[1].Env = tt.proxyEnv
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Sat Feb 10 00:31:55 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  8. docs/en/docs/advanced/settings.md

    For example you could have a file `main.py` with:
    
    ```Python hl_lines="3"
    import os
    
    name = os.getenv("MY_NAME", "World")
    print(f"Hello {name} from Python")
    ```
    
    !!! tip
        The second argument to <a href="https://docs.python.org/3.8/library/os.html#os.getenv" class="external-link" target="_blank">`os.getenv()`</a> is the default value to return.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 15.7K bytes
    - Viewed (0)
  9. docs/zh/docs/advanced/settings.md

    这种做法相当常见,有一个名称,这些环境变量通常放在一个名为 `.env` 的文件中,该文件被称为“dotenv”。
    
    !!! tip
        以点 (`.`) 开头的文件是 Unix-like 系统(如 Linux 和 macOS)中的隐藏文件。
    
        但是,dotenv 文件实际上不一定要具有确切的文件名。
    
    Pydantic 支持使用外部库从这些类型的文件中读取。您可以在<a href="https://docs.pydantic.dev/latest/concepts/pydantic_settings/#dotenv-env-support" class="external-link" target="_blank">Pydantic 设置: Dotenv (.env) 支持</a>中阅读更多相关信息。
    
    !!! tip
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 13.9K bytes
    - Viewed (0)
  10. docs/de/docs/advanced/settings.md

    Sie könnten zum Beispiel eine Datei `main.py` haben mit:
    
    ```Python hl_lines="3"
    import os
    
    name = os.getenv("MY_NAME", "World")
    print(f"Hello {name} from Python")
    ```
    
    !!! tip "Tipp"
        Das zweite Argument für <a href="https://docs.python.org/3.8/library/os.html#os.getenv" class="external-link" target="_blank">`os.getenv()`</a> ist der zurückzugebende Defaultwert.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:17:14 GMT 2024
    - 17.8K bytes
    - Viewed (0)
Back to top