Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 546 for GetEnv (0.15 sec)

  1. test/env.go

    // package os.
    
    package main
    
    import (
    	"os"
    	"runtime"
    )
    
    func main() {
    	ga := os.Getenv("PATH")
    	if runtime.GOOS == "plan9" {
    		ga = os.Getenv("path")
    	}
    	if ga == "" {
    		print("PATH is empty\n")
    		os.Exit(1)
    	}
    	xxx := os.Getenv("DOES_NOT_EXIST")
    	if xxx != "" {
    		print("$DOES_NOT_EXIST=", xxx, "\n")
    		os.Exit(1)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:34:59 UTC 2023
    - 549 bytes
    - Viewed (0)
  2. src/cmd/dist/build.go

    	// For tools being invoked but also for os.ExpandEnv.
    	os.Setenv("GO386", go386)
    	os.Setenv("GOAMD64", goamd64)
    	os.Setenv("GOARCH", goarch)
    	os.Setenv("GOARM", goarm)
    	os.Setenv("GOARM64", goarm64)
    	os.Setenv("GOHOSTARCH", gohostarch)
    	os.Setenv("GOHOSTOS", gohostos)
    	os.Setenv("GOOS", goos)
    	os.Setenv("GOMIPS", gomips)
    	os.Setenv("GOMIPS64", gomips64)
    	os.Setenv("GOPPC64", goppc64)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 18:34:40 UTC 2024
    - 54K bytes
    - Viewed (0)
  3. src/cmd/go/internal/cfg/cfg.go

    	}
    }
    
    // Getenv gets the value for the configuration key.
    // It consults the operating system environment
    // and then the go/env file.
    // If Getenv is called for a key that cannot be set
    // in the go/env file (for example GODEBUG), it panics.
    // This ensures that CanGetenv is accurate, so that
    // 'go env -w' stays in sync with what Getenv can retrieve.
    func Getenv(key string) string {
    	if !CanGetenv(key) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 17:13:51 UTC 2024
    - 19.3K bytes
    - Viewed (0)
  4. platforms/software/resources-s3/src/integTest/groovy/org/gradle/integtests/resource/s3/S3ClientIntegrationTest.groovy

            DefaultAwsCredentials credentials = new DefaultAwsCredentials()
            String bucketName = System.getenv('G_S3_BUCKET')
            credentials.setAccessKey(System.getenv('G_AWS_ACCESS_KEY_ID'))
            credentials.setSecretKey(System.getenv('G_AWS_SECRET_ACCESS_KEY'))
            credentials.setSessionToken(System.getenv('G_AWS_SESSION_TOKEN'))
    
            S3Client s3Client = new S3Client(credentials, new S3ConnectionProperties())
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Oct 12 19:38:08 UTC 2023
    - 9.8K bytes
    - Viewed (0)
  5. src/internal/testlog/log.go

    func Logger() Interface {
    	impl := logger.Load()
    	if impl == nil {
    		return nil
    	}
    	return *impl.(*Interface)
    }
    
    // Getenv calls Logger().Getenv, if a logger has been set.
    func Getenv(name string) {
    	if log := Logger(); log != nil {
    		log.Getenv(name)
    	}
    }
    
    // Open calls Logger().Open, if a logger has been set.
    func Open(name string) {
    	if log := Logger(); log != nil {
    		log.Open(name)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 11 19:08:32 UTC 2017
    - 1.9K bytes
    - Viewed (0)
  6. src/internal/fuzz/mutator_test.go

    package fuzz
    
    import (
    	"bytes"
    	"fmt"
    	"os"
    	"strconv"
    	"testing"
    )
    
    func BenchmarkMutatorBytes(b *testing.B) {
    	origEnv := os.Getenv("GODEBUG")
    	defer func() { os.Setenv("GODEBUG", origEnv) }()
    	os.Setenv("GODEBUG", fmt.Sprintf("%s,fuzzseed=123", origEnv))
    	m := newMutator()
    
    	for _, size := range []int{
    		1,
    		10,
    		100,
    		1000,
    		10000,
    		100000,
    	} {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 2.3K bytes
    - Viewed (0)
  7. platforms/core-runtime/native/src/test/groovy/org/gradle/internal/nativeintegration/processenvironment/ProcessEnvironmentTest.groovy

            then:
            System.getenv("TEST_ENV_1") == "value"
            System.getenv("TEST_ENV_2") == "value"
    
            when:
            env.removeEnvironmentVariable("TEST_ENV_1")
            env.maybeRemoveEnvironmentVariable("TEST_ENV_2")
    
            then:
            System.getenv("TEST_ENV_1") == null
            System.getenv("TEST_ENV_2") == null
        }
    
        @Requires(UnitTestPreconditions.WorkingDir)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Oct 05 19:36:14 UTC 2023
    - 2.7K bytes
    - Viewed (0)
  8. src/testing/testing_test.go

    		if test.initialValueExists {
    			if err := os.Setenv(test.key, test.initialValue); err != nil {
    				t.Fatalf("unable to set env: got %v", err)
    			}
    		} else {
    			os.Unsetenv(test.key)
    		}
    
    		t.Run(test.name, func(t *testing.T) {
    			t.Setenv(test.key, test.newValue)
    			if os.Getenv(test.key) != test.newValue {
    				t.Fatalf("unexpected value after t.Setenv: got %s, want %s", os.Getenv(test.key), test.newValue)
    			}
    		})
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 19:10:41 UTC 2024
    - 19.3K bytes
    - Viewed (0)
  9. platforms/documentation/docs/src/snippets/valueProviders/envVarsSysPropsDo/groovy/build.gradle

    def jdkVariables = ["JDK_8", "JDK_11", "JDK_17"]
    def jdkLocations = jdkVariables.findAll { v ->
        System.getenv(v) != null
    }.collectEntries { v ->
        [v, System.getenv(v)]
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 177 bytes
    - Viewed (0)
  10. platforms/documentation/docs/src/snippets/buildCache/conditional-action/groovy/build.gradle

    plugins {
        id('java-library')
    }
    
    // tag::conditionalAction[]
    if (System.getenv().containsKey("CI")) {
        tasks.withType(Test).configureEach {
            doFirst {
                println "Running test on CI"
            }
        }
    }
    // end::conditionalAction[]
    
    // tag::unconditionalAction[]
    tasks.withType(Test).configureEach {
        doFirst {
            if (System.getenv().containsKey("CI")) {
                println "Running test on CI"
            }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 471 bytes
    - Viewed (0)
Back to top