- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 94 for NumField (0.18 sec)
-
src/net/http/httptrace/trace.go
func (t *ClientTrace) compose(old *ClientTrace) { if old == nil { return } tv := reflect.ValueOf(t).Elem() ov := reflect.ValueOf(old).Elem() structType := tv.Type() for i := 0; i < structType.NumField(); i++ { tf := tv.Field(i) hookType := tf.Type() if hookType.Kind() != reflect.Func { continue } of := ov.Field(i) if of.IsNil() { continue } if tf.IsNil() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 10 03:29:50 UTC 2024 - 8.1K bytes - Viewed (0) -
src/go/internal/gccgoimporter/importer_test.go
{pkgpath: "nointerface",...
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 15 20:17:57 UTC 2022 - 7.2K bytes - Viewed (0) -
tests/migrate_test.go
} typ := reflect.Indirect(reflect.ValueOf(&UserMigrateColumn2{})).Type() numField := typ.NumField() if numField != len(columnTypes) { t.Fatalf("column's number not match struct and ddl, %d != %d", numField, len(columnTypes)) } namer := schema.NamingStrategy{} for i := 0; i < numField; i++ { expectName := namer.ColumnName("", typ.Field(i).Name) if columnTypes[i].Name() != expectName {
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Mon Mar 18 11:24:16 UTC 2024 - 56.2K bytes - Viewed (0) -
src/encoding/asn1/marshal.go
return int64Encoder(v.Int()), nil case reflect.Struct: t := v.Type() for i := 0; i < t.NumField(); i++ { if !t.Field(i).IsExported() { return nil, StructuralError{"struct contains unexported fields"} } } startingField := 0 n := t.NumField() if n == 0 { return bytesEncoder(nil), nil } // If the first element of the structure is a non-empty
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 17.1K bytes - Viewed (0) -
src/encoding/gob/encoder.go
enc.sent[ut.base] = info.id if ut.user != ut.base { enc.sent[ut.user] = info.id } // Now send the inner types switch st := actual; st.Kind() { case reflect.Struct: for i := 0; i < st.NumField(); i++ { if isExported(st.Field(i).Name) { enc.sendType(w, state, st.Field(i).Type) } } case reflect.Array, reflect.Slice: enc.sendType(w, state, st.Elem()) case reflect.Map:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 19:04:28 UTC 2023 - 7.8K bytes - Viewed (0) -
src/cmd/vendor/github.com/google/pprof/internal/driver/config.go
"noinlines": "noinlines", "showcolumns": "showcolumns", } def := defaultConfig() configFieldMap = map[string]configField{} t := reflect.TypeOf(config{}) for i, n := 0, t.NumField(); i < n; i++ { field := t.Field(i) js := strings.Split(field.Tag.Get("json"), ",") if len(js) == 0 { continue } // Get the configuration name for this field. name := js[0]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 16 15:19:53 UTC 2024 - 10.5K bytes - Viewed (0) -
src/testing/quick/quick.go
codePoints := make([]rune, numChars) for i := 0; i < numChars; i++ { codePoints[i] = rune(rand.Intn(0x10ffff)) } v.SetString(string(codePoints)) case reflect.Struct: n := v.NumField() // Divide sizeLeft evenly among the struct fields. sizeLeft := size if n > sizeLeft { sizeLeft = 1 } else if n > 0 { sizeLeft /= n } for i := 0; i < n; i++ {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 08 17:55:47 UTC 2023 - 10.1K bytes - Viewed (0) -
schema/schema.go
if v, ok := cacheStore.Load(schemaCacheKey); ok { s := v.(*Schema) // Wait for the initialization of other goroutines to complete <-s.initialized return s, s.err } for i := 0; i < modelType.NumField(); i++ { if fieldStruct := modelType.Field(i); ast.IsExported(fieldStruct.Name) { if field := schema.ParseField(fieldStruct); field.EmbeddedSchema != nil {
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Wed Jun 12 10:52:33 UTC 2024 - 13.7K bytes - Viewed (0) -
src/cmd/internal/objabi/flag.go
flag := &DebugFlag{ tab: make(map[string]debugField), debugSSA: debugSSA, } v := reflect.ValueOf(debug).Elem() t := v.Type() for i := 0; i < t.NumField(); i++ { f := t.Field(i) ptr := v.Field(i).Addr().Interface() if f.Name == "ConcurrentOk" { switch ptr := ptr.(type) { default: panic("debug.ConcurrentOk must have type bool") case *bool:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Aug 10 23:08:09 UTC 2023 - 9.5K bytes - Viewed (0) -
pkg/api/v1/persistentvolume/util_test.go
case reflect.Struct: // ObjectMeta should not have any field with the word "secret" in it; // it contains cycles so it's easiest to just skip it. if name == "ObjectMeta" { break } for i := 0; i < tp.NumField(); i++ { field := tp.Field(i) secretPaths.Insert(sets.List[string](collectSecretPaths(t, path.Child(field.Name), field.Name, field.Type))...) } case reflect.Interface:
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Sep 25 11:04:08 UTC 2023 - 14.5K bytes - Viewed (0)