Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 74 for valfunc (0.15 sec)

  1. src/slices/sort_test.go

    			}
    
    			gotMax := Max(tt.data)
    			if gotMax != tt.wantMax {
    				t.Errorf("Max got %v, want %v", gotMax, tt.wantMax)
    			}
    
    			gotMaxFunc := MaxFunc(tt.data, intCmp)
    			if gotMaxFunc != tt.wantMax {
    				t.Errorf("MaxFunc got %v, want %v", gotMaxFunc, tt.wantMax)
    			}
    		})
    	}
    
    	svals := []S{
    		{1, "a"},
    		{2, "a"},
    		{1, "b"},
    		{2, "b"},
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 09 19:20:55 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/server/egressselector/egress_selector.go

    	}
    	return cs, nil
    }
    
    // NewEgressSelectorWithMap returns a EgressSelector with the supplied EgressType to DialFunc map.
    func NewEgressSelectorWithMap(m map[EgressType]utilnet.DialFunc) *EgressSelector {
    	if m == nil {
    		m = make(map[EgressType]utilnet.DialFunc)
    	}
    	return &EgressSelector{
    		egressToDialer: m,
    	}
    }
    
    // Lookup gets the dialer function for the network context.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 29 15:48:39 UTC 2023
    - 12.5K bytes
    - Viewed (0)
  3. src/cmd/go/testdata/script/cover_coverpkg_with_init.txt

    module M
    
    go 1.21
    -- a/a.go --
    package a
    
    import "M/f"
    
    func init() {
    	println("package 'a' init: launch the missiles!")
    }
    
    func AFunc() int {
    	return f.Id()
    }
    -- a/a_test.go --
    package a
    
    import "testing"
    
    func TestA(t *testing.T) {
    	if AFunc() != 42 {
    		t.Fatalf("bad!")
    	}
    }
    -- b/b.go --
    package b
    
    func init() {
    	println("package 'b' init: release the kraken")
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Sep 30 12:33:44 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  4. src/path/filepath/path.go

    		return string(buf), nil
    	}
    	return targ[t0:], nil
    }
    
    // SkipDir is used as a return value from [WalkFunc] to indicate that
    // the directory named in the call is to be skipped. It is not returned
    // as an error by any function.
    var SkipDir error = fs.SkipDir
    
    // SkipAll is used as a return value from [WalkFunc] to indicate that
    // all remaining files and directories are to be skipped. It is not returned
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  5. testing/internal-performance-testing/src/test/groovy/org/gradle/performance/measure/AmountTest.groovy

            def sum = Amount.valueOf(valueA, unitsA) + Amount.valueOf(valueB, unitsB)
            expect:
            sum == Amount.valueOf(valueC, unitsC)
            sum.toString() == Amount.valueOf(valueC, unitsC).toString()
    
            where:
            valueA | unitsA        | valueB | unitsB        | valueC  | unitsC
            0      | Fruit.apples  | 0      | Fruit.oranges | 0       | Fruit.apples
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  6. src/cmd/cover/testdata/pkgcfg/a/a.go

    type Atyp int
    
    func (ap *Atyp) Set(q int) {
    	*ap = Atyp(q)
    }
    
    func (ap Atyp) Get() int {
    	inter := func(q Atyp) int {
    		return int(q)
    	}
    	return inter(ap)
    }
    
    var afunc = func(x int) int {
    	return x + 1
    }
    var Avar = afunc(42)
    
    func A(x int) int {
    	if x == 0 {
    		return 22
    	} else if x == 1 {
    		return 33
    	}
    	return 44
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 28 11:48:40 UTC 2022
    - 330 bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/plugin/pkg/audit/webhook/webhook.go

    func retryOnError(err error) bool {
    	if err != nil {
    		return true
    	}
    	return false
    }
    
    func loadWebhook(configFile string, groupVersion schema.GroupVersion, retryBackoff wait.Backoff, customDial utilnet.DialFunc) (*webhook.GenericWebhook, error) {
    	clientConfig, err := webhook.LoadKubeconfig(configFile, customDial)
    	if err != nil {
    		return nil, err
    	}
    	w, err := webhook.NewGenericWebhook(audit.Scheme, audit.Codecs, clientConfig,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Nov 07 21:13:31 UTC 2022
    - 4.5K bytes
    - Viewed (0)
  8. src/slices/sort.go

    		m = max(m, x[i])
    	}
    	return m
    }
    
    // MaxFunc returns the maximal value in x, using cmp to compare elements.
    // It panics if x is empty. If there is more than one maximal element
    // according to the cmp function, MaxFunc returns the first one.
    func MaxFunc[S ~[]E, E any](x S, cmp func(a, b E) int) E {
    	if len(x) < 1 {
    		panic("slices.MaxFunc: empty list")
    	}
    	m := x[0]
    	for i := 1; i < len(x); i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 07 23:54:41 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  9. src/cmd/vet/main.go

    	"golang.org/x/tools/go/analysis/passes/ifaceassert"
    	"golang.org/x/tools/go/analysis/passes/loopclosure"
    	"golang.org/x/tools/go/analysis/passes/lostcancel"
    	"golang.org/x/tools/go/analysis/passes/nilfunc"
    	"golang.org/x/tools/go/analysis/passes/printf"
    	"golang.org/x/tools/go/analysis/passes/shift"
    	"golang.org/x/tools/go/analysis/passes/sigchanyzer"
    	"golang.org/x/tools/go/analysis/passes/slog"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  10. test/codegen/retpoline.go

    // asmcheck -gcflags=-spectre=ret
    
    //go:build amd64
    
    package codegen
    
    func CallFunc(f func()) {
    	// amd64:`CALL\truntime.retpoline`
    	f()
    }
    
    func CallInterface(x interface{ M() }) {
    	// amd64:`CALL\truntime.retpoline`
    	x.M()
    }
    
    // Check to make sure that jump tables are disabled
    // when retpoline is on. See issue 57097.
    func noJumpTables(x int) int {
    	switch x {
    	case 0:
    		return 0
    	case 1:
    		return 1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 580 bytes
    - Viewed (0)
Back to top