Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,455 for IsSwitch (0.15 sec)

  1. src/cmd/go/internal/toolchain/switch.go

    	}
    }
    
    // NeedSwitch reports whether Switch would attempt to switch toolchains.
    func (s *Switcher) NeedSwitch() bool {
    	return s.TooNew != nil && (HasAuto() || HasPath())
    }
    
    // Switch decides whether to switch to a newer toolchain
    // to resolve any of the saved errors.
    // It switches if toolchain switches are permitted and there is at least one TooNewError.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 18:15:22 UTC 2024
    - 7K bytes
    - Viewed (0)
  2. test/codegen/switch.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // These tests check code generation of switch statements.
    
    package codegen
    
    // see issue 33934
    func f(x string) int {
    	// amd64:-`cmpstring`
    	switch x {
    	case "":
    		return -1
    	case "1", "2", "3":
    		return -2
    	default:
    		return -3
    	}
    }
    
    // use jump tables for 8+ int cases
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 09 18:39:50 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  3. src/net/internal/socktest/switch.go

    package socktest
    
    import (
    	"fmt"
    	"sync"
    )
    
    // A Switch represents a callpath point switch for socket system
    // calls.
    type Switch struct {
    	once sync.Once
    
    	fmu   sync.RWMutex
    	fltab map[FilterType]Filter
    
    	smu   sync.RWMutex
    	sotab Sockets
    	stats stats
    }
    
    func (sw *Switch) init() {
    	sw.fltab = make(map[FilterType]Filter)
    	sw.sotab = make(Sockets)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  4. src/internal/abi/switch.go

    	if !go122InterfaceSwitchCache {
    		return false
    	}
    	// We need an atomic load instruction to make the cache multithreaded-safe.
    	// (AtomicLoadPtr needs to be implemented in cmd/compile/internal/ssa/_gen/ARCH.rules.)
    	switch goarch {
    	case "amd64", "arm64", "loong64", "mips", "mipsle", "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x":
    		return true
    	default:
    		return false
    	}
    }
    
    type TypeAssert struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 06 17:02:53 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  5. src/net/nss.go

    	"time"
    )
    
    const (
    	nssConfigPath = "/etc/nsswitch.conf"
    )
    
    var nssConfig nsswitchConfig
    
    type nsswitchConfig struct {
    	initOnce sync.Once // guards init of nsswitchConfig
    
    	// ch is used as a semaphore that only allows one lookup at a
    	// time to recheck nsswitch.conf
    	ch          chan struct{} // guards lastChecked and modTime
    	lastChecked time.Time     // last time nsswitch.conf was checked
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 20:15:51 UTC 2022
    - 5.5K bytes
    - Viewed (0)
  6. src/net/nss_test.go

    package net
    
    import (
    	"reflect"
    	"testing"
    	"time"
    )
    
    const ubuntuTrustyAvahi = `# /etc/nsswitch.conf
    #
    # Example configuration of GNU Name Service Switch functionality.
    # If you have the libc-doc-reference' and nfo' packages installed, try:
    # nfo libc "Name Service Switch"' for information about this file.
    
    passwd:         compat
    group:          compat
    shadow:         compat
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 20:15:51 UTC 2022
    - 3.4K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/syntax/tokens.go

    	_Import      // import
    	_Interface   // interface
    	_Map         // map
    	_Package     // package
    	_Range       // range
    	_Return      // return
    	_Select      // select
    	_Struct      // struct
    	_Switch      // switch
    	_Type        // type
    	_Var         // var
    
    	// empty line comment to exclude it from .String
    	tokenCount //
    )
    
    const (
    	// for BranchStmt
    	Break       = _Break
    	Continue    = _Continue
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 20 14:52:38 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/walk/stmt.go

    		}
    		return n
    
    	case ir.OINLMARK:
    		n := n.(*ir.InlineMarkStmt)
    		return n
    
    	case ir.OSELECT:
    		n := n.(*ir.SelectStmt)
    		walkSelect(n)
    		return n
    
    	case ir.OSWITCH:
    		n := n.(*ir.SwitchStmt)
    		walkSwitch(n)
    		return n
    
    	case ir.ORANGE:
    		n := n.(*ir.RangeStmt)
    		return walkRange(n)
    	}
    
    	// No return! Each case must return (or panic),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 06 15:42:30 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  9. tools/istio-iptables/pkg/dependencies/implementation_linux_test.go

    	original := file.AsStringOrFail(t, "/etc/nsswitch.conf")
    	var sandboxed string
    
    	originalNetNS, err := netns.Get()
    	assert.NoError(t, err)
    	var sandboxedNetNS netns.NsHandle
    
    	// Due to unshare-go imports above, this can run
    	assert.NoError(t, runInSandbox("", func() error {
    		// We should have overwritten this file with /dev/null
    		sandboxed = file.AsStringOrFail(t, "/etc/nsswitch.conf")
    		sandboxedNetNS, err = netns.Get()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Feb 26 20:05:40 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  10. src/internal/types/testdata/fixedbugs/issue43110.go

    type P *struct{}
    
    func _() {
    	// want an error even if the switch is empty
    	var a struct{ _ func() }
    	switch a /* ERROR "cannot switch on a" */ {
    	}
    
    	switch a /* ERROR "cannot switch on a" */ {
    	case a: // no follow-on error here
    	}
    
    	// this is ok because f can be compared to nil
    	var f func()
    	switch f {
    	}
    
    	switch f {
    	case nil:
    	}
    
    	switch (func())(nil) {
    	case nil:
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:27 UTC 2023
    - 794 bytes
    - Viewed (0)
Back to top