- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for NumIn (0.04 sec)
-
src/text/template/funcs.go
return reflect.Value{}, err } numIn := typ.NumIn() var dddType reflect.Type if typ.IsVariadic() { if len(args) < numIn-1 { return reflect.Value{}, fmt.Errorf("wrong number of args for %s: got %d want at least %d", name, len(args), numIn-1) } dddType = typ.In(numIn - 1).Elem() } else { if len(args) != numIn {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 24 22:23:55 UTC 2024 - 20.9K bytes - Viewed (0) -
src/text/template/exec.go
} typ := fun.Type() numIn := len(args) if !isMissing(final) { numIn++ } numFixed := len(args) if typ.IsVariadic() { numFixed = typ.NumIn() - 1 // last arg is the variadic one. if numIn < numFixed { s.errorf("wrong number of args for %s: want at least %d got %d", name, typ.NumIn()-1, len(args)) } } else if numIn != typ.NumIn() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 24 21:22:24 UTC 2024 - 32K bytes - Viewed (0) -
src/testing/quick/quick.go
return SetupError("function does not return one value") } if fType.Out(0).Kind() != reflect.Bool { return SetupError("function does not return a bool") } arguments := make([]reflect.Value, fType.NumIn()) rand := config.getRand() maxCount := config.getMaxCount() for i := 0; i < maxCount; i++ { err := arbitraryValues(arguments, fType, config, rand) if err != nil { return err }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 08 17:55:47 UTC 2023 - 10.1K bytes - Viewed (0) -
src/internal/reflectlite/type.go
func (t rtype) NumField() int { tt := t.Type.StructType() if tt == nil { panic("reflect: NumField of non-struct type") } return len(tt.Fields) } func (t rtype) NumIn() int { tt := t.Type.FuncType() if tt == nil { panic("reflect: NumIn of non-func type") } return int(tt.InCount) } func (t rtype) NumOut() int { tt := t.Type.FuncType() if tt == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 17:01:54 UTC 2024 - 16.2K bytes - Viewed (0) -
src/runtime/syscall_windows_test.go
funcname := f.cName(cdecl) attr := "__stdcall" if cdecl { attr = "__cdecl" } typename := "t" + funcname t := reflect.TypeOf(f.goFunc) cTypes := make([]string, t.NumIn()) cArgs := make([]string, t.NumIn()) for i := range cTypes { // We included stdint.h, so this works for all sized // integer types, and uint8Pair_t. cTypes[i] = t.In(i).Name() + "_t" if t.In(i).Name() == "uint8Pair" {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Aug 31 16:31:35 UTC 2023 - 32.5K bytes - Viewed (0) -
src/net/rpc/server.go
// Method must be exported. if !method.IsExported() { continue } // Method needs three ins: receiver, *args, *reply. if mtype.NumIn() != 3 { if logErr { log.Printf("rpc.Register: method %q has %d input parameters; needs exactly three\n", mname, mtype.NumIn()) } continue } // First arg need not be a pointer. argType := mtype.In(1) if !isExportedOrBuiltinType(argType) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 10 03:29:50 UTC 2024 - 21.6K bytes - Viewed (0) -
src/math/rand/v2/regress_test.go
m := rv.Type().Method(i) mv := rv.Method(i) mt := mv.Type() if mt.NumOut() == 0 { continue } for repeat := 0; repeat < 20; repeat++ { var args []reflect.Value var argstr string if mt.NumIn() == 1 { var x any switch mt.In(0).Kind() { default: t.Fatalf("unexpected argument type for r.%s", m.Name) case reflect.Int: if m.Name == "Perm" {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 18:03:11 UTC 2024 - 20.3K bytes - Viewed (0) -
src/testing/fuzz.go
// ff should be in the form func(*testing.T, ...interface{}) fn := reflect.ValueOf(ff) fnType := fn.Type() if fnType.Kind() != reflect.Func { panic("testing: F.Fuzz must receive a function") } if fnType.NumIn() < 2 || fnType.In(0) != reflect.TypeOf((*T)(nil)) { panic("testing: fuzz target must receive at least two arguments, where the first argument is a *T") } if fnType.NumOut() != 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 22:55:25 UTC 2024 - 22.9K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go
func (e Equalities) AddFunc(eqFunc interface{}) error { fv := reflect.ValueOf(eqFunc) ft := fv.Type() if ft.Kind() != reflect.Func { return fmt.Errorf("expected func, got: %v", ft) } if ft.NumIn() != 2 { return fmt.Errorf("expected two 'in' params, got: %v", ft) } if ft.NumOut() != 1 { return fmt.Errorf("expected one 'out' param, got: %v", ft) } if ft.In(0) != ft.In(1) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jul 20 17:18:42 UTC 2022 - 10.8K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/scheme.go
} } s.typeToGVK[t] = append(s.typeToGVK[t], gvk) // if the type implements DeepCopyInto(<obj>), register a self-conversion if m := reflect.ValueOf(obj).MethodByName("DeepCopyInto"); m.IsValid() && m.Type().NumIn() == 1 && m.Type().NumOut() == 0 && m.Type().In(0) == reflect.TypeOf(obj) { if err := s.AddGeneratedConversionFunc(obj, obj, func(a, b interface{}, scope conversion.Scope) error { // copy a to b
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Dec 18 04:27:38 UTC 2022 - 25.2K bytes - Viewed (0)