Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 546 for GetEnv (0.15 sec)

  1. src/runtime/env_test.go

    import (
    	"runtime"
    	"syscall"
    	"testing"
    )
    
    func TestFixedGOROOT(t *testing.T) {
    	// Restore both the real GOROOT environment variable, and runtime's copies:
    	if orig, ok := syscall.Getenv("GOROOT"); ok {
    		defer syscall.Setenv("GOROOT", orig)
    	} else {
    		defer syscall.Unsetenv("GOROOT")
    	}
    	envs := runtime.Envs()
    	oldenvs := append([]string{}, envs...)
    	defer runtime.SetEnvs(oldenvs)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 19 11:28:19 UTC 2020
    - 1.2K bytes
    - Viewed (0)
  2. src/syscall/mkpost.go

    	"go/format"
    	"io"
    	"log"
    	"os"
    	"regexp"
    	"strings"
    )
    
    func main() {
    	b, err := io.ReadAll(os.Stdin)
    	if err != nil {
    		log.Fatal(err)
    	}
    	s := string(b)
    
    	goarch := os.Getenv("GOARCH")
    	goos := os.Getenv("GOOS")
    	switch {
    	case goarch == "s390x" && goos == "linux":
    		// Export the types of PtraceRegs fields.
    		re := regexp.MustCompile("ptrace(Psw|Fpregs|Per)")
    		s = re.ReplaceAllString(s, "Ptrace$1")
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 25 02:59:05 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/api/apitesting/codec.go

    	}
    	return codecs.LegacyCodec(gvs...)
    }
    
    func init() {
    	var err error
    	if apiMediaType := os.Getenv("KUBE_TEST_API_TYPE"); len(apiMediaType) > 0 {
    		testCodecMediaType, _, err = mime.ParseMediaType(apiMediaType)
    		if err != nil {
    			panic(err)
    		}
    	}
    
    	if storageMediaType := os.Getenv("KUBE_TEST_API_STORAGE_TYPE"); len(storageMediaType) > 0 {
    		testStorageCodecMediaType, _, err = mime.ParseMediaType(storageMediaType)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Aug 01 19:31:12 UTC 2018
    - 3.9K bytes
    - Viewed (0)
  4. src/cmd/go/testdata/script/test_env_term.txt

    # Tests golang.org/issue/12096
    
    env TERM=''
    go test test_test.go
    ! stdout '^ok.*\[no tests to run\]'
    stdout '^ok'
    
    -- test_test.go --
    package main
    import ("os"; "testing")
    func TestEnv(t *testing.T) {
    	if os.Getenv("TERM") != "" {
    		t.Fatal("TERM is set")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 19 21:18:17 UTC 2020
    - 260 bytes
    - Viewed (0)
  5. platforms/documentation/docs/src/snippets/tutorial/environmentVariables/groovy/build.gradle

    // tag::configuration[]
    // Using the Java API
    println System.getenv('ENVIRONMENTAL')
    
    // Using the Gradle API, provides a lazy Provider<String>
    println providers.environmentVariable('ENVIRONMENTAL').get()
    // end::configuration[]
    
    abstract class PrintValue extends DefaultTask {
        @Input abstract Property<String> getInputValue()
        @TaskAction void action() { println(inputValue.get()) }
    }
    
    // tag::execution[]
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 627 bytes
    - Viewed (0)
  6. src/runtime/internal/wasitest/tcpecho_test.go

    	// port when you pre-open a socket. So, we probe for a free port here.
    	// Given there's an unavoidable race condition, the test is disabled by
    	// default.
    	if os.Getenv("GOWASIENABLERACYTEST") != "1" {
    		t.Skip("skipping WASI test with unavoidable race condition")
    	}
    	var host string
    	port := rand.Intn(10000) + 40000
    	for attempts := 0; attempts < 10; attempts++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 22:01:11 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  7. platforms/documentation/docs/src/snippets/valueProviders/envVarsSysPropsDoValueSource/kotlin/build.gradle.kts

        interface Parameters : ValueSourceParameters {
            val substring: Property<String>
        }
    
        override fun obtain(): Map<String, String> {
            return System.getenv().filterKeys { key ->
                key.contains(parameters.substring.get())
            }
        }
    }
    // end::value-source[]
    
    // tag::create-provider[]
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 726 bytes
    - Viewed (0)
  8. build-logic-commons/gradle-plugin/src/main/kotlin/gradlebuild.test-retry.gradle.kts

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    plugins {
        id("org.gradle.test-retry")
    }
    
    if (System.getenv().containsKey("CI")) {
        tasks.withType<Test>().configureEach {
            retry {
                maxRetries.set(2)
            }
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Apr 26 06:43:17 UTC 2023
    - 810 bytes
    - Viewed (0)
  9. src/runtime/testdata/testfds/main.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"fmt"
    	"io"
    	"log"
    	"os"
    )
    
    func main() {
    	f, err := os.OpenFile(os.Getenv("TEST_OUTPUT"), os.O_CREATE|os.O_RDWR, 0600)
    	if err != nil {
    		log.Fatalf("os.Open failed: %s", err)
    	}
    	defer f.Close()
    	b, err := io.ReadAll(os.Stdin)
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jul 25 16:33:33 UTC 2023
    - 642 bytes
    - Viewed (0)
  10. src/cmd/go/testdata/script/build_cc_cache_issue64423.txt

    package main
    
    import (
    	"bufio"
    	"bytes"
    	"log"
    	"os"
    	"os/exec"
    	"path/filepath"
    	"strings"
    )
    
    func main() {
    	if os.Getenv("GO_BREAK_CLANG") != "" {
    		os.Stderr.WriteString("GO_BREAK_CLANG is set\n")
    		os.Exit(1)
    	}
    
    	b, err := os.ReadFile(filepath.Join(os.Getenv("WORK"), ".realclang"))
    	if err != nil {
    		log.Fatal(err)
    	}
    	clang := string(bytes.TrimSpace(b))
    	cmd := exec.Command(clang, os.Args[1:]...)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Dec 07 19:13:29 UTC 2023
    - 2.9K bytes
    - Viewed (0)
Back to top