- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for NumIn (0.03 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/reflect/abi_test.go
if typ.Kind() != reflect.Func { t.Fatalf("test case is not a function, has type: %s", typ.String()) } if typ.NumIn() != typ.NumOut() { t.Fatalf("test case has different number of inputs and outputs: %d in, %d out", typ.NumIn(), typ.NumOut()) } var args []reflect.Value for i := 0; i < typ.NumIn(); i++ { args = append(args, genValue(t, typ.In(i), r)) } results := fn.Call(args)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 05 17:54:15 UTC 2022 - 26.4K 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/go/internal/gccgoimporter/testdata/v1reflect.gox
func...
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Sep 30 21:33:51 UTC 2021 - 10.3K 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/regress_test.go
mv := rv.Method(i) mt := mv.Type() if mt.NumOut() == 0 { continue } r.Seed(0) 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: Mon Dec 13 18:45:54 UTC 2021 - 17.8K 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)