Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 75 for stringSlice (0.19 sec)

  1. 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)
  2. 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)
  3. 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)
  4. src/net/lookup_plan9.go

    }
    
    func handlePlan9DNSError(err error, name string) error {
    	if stringslite.HasSuffix(err.Error(), "dns: name does not exist") ||
    		stringslite.HasSuffix(err.Error(), "dns: resource does not exist; negrcode 0") ||
    		stringslite.HasSuffix(err.Error(), "dns: resource does not exist; negrcode") ||
    		stringslite.HasSuffix(err.Error(), "dns failure") {
    		err = errNoSuchHost
    	}
    	return newDNSError(err, name, "")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 17:08:38 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. tests/scanner_valuer_test.go

    	default:
    		return errors.New("Cannot scan NamedInt from " + reflect.ValueOf(src).String())
    	}
    	return nil
    }
    
    type StringsSlice []string
    
    func (l StringsSlice) Value() (driver.Value, error) {
    	bytes, err := json.Marshal(l)
    	return string(bytes), err
    }
    
    func (l *StringsSlice) Scan(input interface{}) error {
    	switch value := input.(type) {
    	case string:
    		return json.Unmarshal([]byte(value), l)
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 07 07:02:07 UTC 2023
    - 10.6K bytes
    - Viewed (0)
  8. src/runtime/export_debug_test.go

    	// Double-check m.
    	if getg().m != h.mp {
    		println("trap on wrong M", getg().m, h.mp)
    		return false
    	}
    	f := findfunc(ctxt.sigpc())
    	if !(stringslite.HasPrefix(funcname(f), "runtime.debugCall") || stringslite.HasPrefix(funcname(f), "debugCall")) {
    		println("trap in unknown function", funcname(f))
    		return false
    	}
    	if !sigctxtAtTrapInstruction(ctxt) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 15:41:45 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  9. src/unique/clone.go

    // Copyright 2024 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 unique
    
    import (
    	"internal/abi"
    	"internal/stringslite"
    	"unsafe"
    )
    
    // clone makes a copy of value, and may update string values found in value
    // with a cloned version of those strings. The purpose of explicitly cloning
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun May 05 00:24:21 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  10. src/internal/poll/fd_plan9.go

    }
    
    // ReadUnlock wraps FD.readUnlock.
    func (fd *FD) ReadUnlock() {
    	fd.readUnlock()
    }
    
    func isHangup(err error) bool {
    	return err != nil && stringslite.HasSuffix(err.Error(), "Hangup")
    }
    
    func isInterrupted(err error) bool {
    	return err != nil && stringslite.HasSuffix(err.Error(), "interrupted")
    }
    
    // IsPollDescriptor reports whether fd is the descriptor being used by the poller.
    // This is only used for testing.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 06 14:00:54 UTC 2024
    - 5.4K bytes
    - Viewed (0)
Back to top