Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 40 for stringSlice (0.29 sec)

  1. src/runtime/security_unix.go

    // Copyright 2023 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build unix
    
    package runtime
    
    import (
    	"internal/stringslite"
    )
    
    func secure() {
    	initSecureMode()
    
    	if !isSecureMode() {
    		return
    	}
    
    	// When secure mode is enabled, we do one thing: enforce specific
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 15:41:45 UTC 2024
    - 866 bytes
    - Viewed (0)
  2. src/strings/clone.go

    // Copyright 2021 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package strings
    
    import (
    	"internal/stringslite"
    )
    
    // Clone returns a fresh copy of s.
    // It guarantees to make a copy of s into a new allocation,
    // which can be important when retaining only a small substring
    // of a much larger string. Using Clone can help such programs
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 04 01:23:42 UTC 2024
    - 809 bytes
    - Viewed (0)
  3. src/runtime/symtabinl_test.go

    			const wantFile = "symtabinl_test.go"
    			if !stringslite.HasSuffix(file, wantFile) {
    				t.Errorf("tiuTest+%#x: want file ...%s, got %s", pc-pc1, wantFile, file)
    			}
    
    			sf := u.srcFunc(uf)
    
    			name := sf.name()
    			const namePrefix = "runtime."
    			if stringslite.HasPrefix(name, namePrefix) {
    				name = name[len(namePrefix):]
    			}
    			if !stringslite.HasPrefix(name, "tiu") {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 15:41:45 UTC 2024
    - 3K bytes
    - Viewed (0)
  4. src/net/dnsconfig_unix.go

    				switch {
    				case stringslite.HasPrefix(s, "ndots:"):
    					n, _, _ := dtoi(s[6:])
    					if n < 0 {
    						n = 0
    					} else if n > 15 {
    						n = 15
    					}
    					conf.ndots = n
    				case stringslite.HasPrefix(s, "timeout:"):
    					n, _, _ := dtoi(s[8:])
    					if n < 1 {
    						n = 1
    					}
    					conf.timeout = time.Duration(n) * time.Second
    				case stringslite.HasPrefix(s, "attempts:"):
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 02 22:14:43 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  5. src/crypto/internal/boring/fipstls/tls.go

    	// Since this is an internal package, testing that this isn't used on the
    	// other operating systems should suffice to catch any mistakes.
    	if !stringslite.HasSuffix(name, "_test") && !stringslite.HasSuffix(name, ".test") && name != "NaClMain" && name != "" {
    		panic("fipstls: invalid use of Abandon in " + name)
    	}
    	required.Store(false)
    }
    
    // provided by runtime
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 06 14:00:54 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  6. src/os/executable_procfs.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build linux || netbsd
    
    package os
    
    import (
    	"errors"
    	"internal/stringslite"
    	"runtime"
    )
    
    func executable() (string, error) {
    	var procfn string
    	switch runtime.GOOS {
    	default:
    		return "", errors.New("Executable not implemented for " + runtime.GOOS)
    	case "linux", "android":
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun May 05 00:26:04 UTC 2024
    - 715 bytes
    - Viewed (0)
  7. src/strconv/atoi.go

    func syntaxError(fn, str string) *NumError {
    	return &NumError{fn, stringslite.Clone(str), ErrSyntax}
    }
    
    func rangeError(fn, str string) *NumError {
    	return &NumError{fn, stringslite.Clone(str), ErrRange}
    }
    
    func baseError(fn, str string, base int) *NumError {
    	return &NumError{fn, stringslite.Clone(str), errors.New("invalid base " + Itoa(base))}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun May 05 00:24:26 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  8. src/internal/filepathlite/path_unix.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build unix || (js && wasm) || wasip1
    
    package filepathlite
    
    import (
    	"internal/bytealg"
    	"internal/stringslite"
    )
    
    const (
    	Separator     = '/' // OS-specific path separator
    	ListSeparator = ':' // OS-specific path list separator
    )
    
    func IsPathSeparator(c uint8) bool {
    	return Separator == c
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 23:07:50 UTC 2024
    - 935 bytes
    - Viewed (0)
  9. src/crypto/internal/boring/boring.go

    // when BoringCrypto is in use. It panics.
    func UnreachableExceptTests() {
    	name := runtime_arg0()
    	// If BoringCrypto ran on Windows we'd need to allow _test.exe and .test.exe as well.
    	if !stringslite.HasSuffix(name, "_test") && !stringslite.HasSuffix(name, ".test") {
    		println("boringcrypto: unexpected code execution in", name)
    		panic("boringcrypto: invalid code execution")
    	}
    }
    
    type fail string
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 06 14:00:54 UTC 2024
    - 3K bytes
    - Viewed (0)
  10. src/internal/filepathlite/path.go

    		return false
    	}
    	hasDots := false
    	for p := path; p != ""; {
    		var part string
    		part, p, _ = stringslite.Cut(p, "/")
    		if part == "." || part == ".." {
    			hasDots = true
    			break
    		}
    	}
    	if hasDots {
    		path = Clean(path)
    	}
    	if path == ".." || stringslite.HasPrefix(path, "../") {
    		return false
    	}
    	return true
    }
    
    // Localize is filepath.Localize.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 23:07:50 UTC 2024
    - 5.8K bytes
    - Viewed (0)
Back to top