Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 21 for findfunc (0.2 sec)

  1. src/cmd/cover/func.go

    			total += t
    			covered += c
    		}
    	}
    	fmt.Fprintf(tabber, "total:\t(statements)\t%.1f%%\n", percent(covered, total))
    
    	return nil
    }
    
    // findFuncs parses the file and returns a slice of FuncExtent descriptors.
    func findFuncs(name string) ([]*FuncExtent, error) {
    	fset := token.NewFileSet()
    	parsedFile, err := parser.ParseFile(fset, name, nil, 0)
    	if err != nil {
    		return nil, err
    	}
    	visitor := &FuncVisitor{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 17:49:12 UTC 2022
    - 6.3K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/api/apitesting/roundtrip/construct.go

    	"k8s.io/apimachinery/pkg/runtime"
    	"k8s.io/apimachinery/pkg/runtime/schema"
    	"k8s.io/apimachinery/pkg/util/intstr"
    )
    
    func defaultFillFuncs() map[reflect.Type]FillFunc {
    	funcs := map[reflect.Type]FillFunc{}
    	funcs[reflect.TypeOf(&runtime.RawExtension{})] = func(s string, i int, obj interface{}) {
    		// generate a raw object in normalized form
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 27 19:12:59 UTC 2023
    - 6.5K bytes
    - Viewed (0)
  3. src/slices/sort_test.go

    			gotMin := Min(tt.data)
    			if gotMin != tt.wantMin {
    				t.Errorf("Min got %v, want %v", gotMin, tt.wantMin)
    			}
    
    			gotMinFunc := MinFunc(tt.data, intCmp)
    			if gotMinFunc != tt.wantMin {
    				t.Errorf("MinFunc got %v, want %v", gotMinFunc, tt.wantMin)
    			}
    
    			gotMax := Max(tt.data)
    			if gotMax != tt.wantMax {
    				t.Errorf("Max got %v, want %v", gotMax, tt.wantMax)
    			}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 09 19:20:55 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  4. src/slices/sort.go

    		m = min(m, x[i])
    	}
    	return m
    }
    
    // MinFunc returns the minimal value in x, using cmp to compare elements.
    // It panics if x is empty. If there is more than one minimal element
    // according to the cmp function, MinFunc returns the first one.
    func MinFunc[S ~[]E, E any](x S, cmp func(a, b E) int) E {
    	if len(x) < 1 {
    		panic("slices.MinFunc: 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)
  5. src/internal/abi/symtab.go

    	UnsafePointRestart2 = -4
    
    	// Like UnsafePointRestart1, but back to function entry if async preempted.
    	UnsafePointRestartAtEntry = -5
    )
    
    const MINFUNC = 16 // minimum size for a function
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 16 14:25:22 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiextensions-apiserver/pkg/apis/roundtrip_test.go

    		require.NoError(t, builder.AddToScheme(scheme))
    	}
    
    	opts := roundtrip.NewCompatibilityTestOptions(scheme)
    
    	// Fill unstructured JSON field types
    	opts.FillFuncs = map[reflect.Type]roundtrip.FillFunc{
    		reflect.TypeOf(&apiextensionv1.JSON{}): func(s string, i int, obj interface{}) {
    			obj.(*apiextensionv1.JSON).Raw = []byte(strconv.Quote(s + "Value"))
    		},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 27 19:12:59 UTC 2023
    - 2K bytes
    - Viewed (0)
  7. pkg/test/framework/components/echo/common/call.go

    	"istio.io/istio/pkg/test/framework/components/echo"
    	"istio.io/istio/pkg/test/scopes"
    	"istio.io/istio/pkg/test/util/retry"
    )
    
    type sendFunc func(req *proto.ForwardEchoRequest) (echoclient.Responses, error)
    
    func callInternal(srcName string, from echo.Caller, opts echo.CallOptions, send sendFunc) (echo.CallResult, error) {
    	// Create the proto request.
    	req := newForwardRequest(opts)
    	sendAndValidate := func() (echo.CallResult, error) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Oct 08 09:39:20 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  8. src/cmd/cgo/internal/testerrors/testdata/issue42580.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Issue 42580: cmd/cgo: shifting identifier position in ast
    
    package cgotest
    
    // typedef int (*intFunc) ();
    //
    // char* strarg = "";
    //
    // int func_with_char(char* arg, void* dummy)
    // {return 5;}
    //
    // int* get_arr(char* arg, void* dummy)
    // {return NULL;}
    import "C"
    import "unsafe"
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/inline/inlheur/testdata/props/calls.go

    // {"Flags":0,"ParamFlags":[0],"ResultFlags":[0]}
    // <endcallsites>
    // <endfuncpreamble>
    func T_call_scoring_in_noninlinable_func(x int, sl []int) int {
    	if x == 101 {
    		// Drive up the cost of inlining this funcfunc over the
    		// regular threshold.
    		for i := 0; i < 10; i++ {
    			for j := 0; j < i; j++ {
    				sl = append(sl, append(sl, append(sl, append(sl, x)...)...)...)
    				sl = append(sl, sl[0], sl[1], sl[2])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 16 20:15:25 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  10. src/slices/example_test.go

    func ExampleMinFunc() {
    	type Person struct {
    		Name string
    		Age  int
    	}
    	people := []Person{
    		{"Gopher", 13},
    		{"Bob", 5},
    		{"Vera", 24},
    		{"Bill", 5},
    	}
    	firstYoungest := slices.MinFunc(people, func(a, b Person) int {
    		return cmp.Compare(a.Age, b.Age)
    	})
    	fmt.Println(firstYoungest.Name)
    	// Output:
    	// Bob
    }
    
    func ExampleReplace() {
    	names := []string{"Alice", "Bob", "Vera", "Zac"}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 17:28:50 UTC 2024
    - 8.1K bytes
    - Viewed (0)
Back to top