Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for StructTag (0.15 sec)

  1. schema/utils.go

    		}
    	}
    	return
    }
    
    func removeSettingFromTag(tag reflect.StructTag, names ...string) reflect.StructTag {
    	for _, name := range names {
    		tag = reflect.StructTag(regexp.MustCompile(`(?i)(gorm:.*?)(`+name+`(:.*?)?)(;|("))`).ReplaceAllString(string(tag), "${1}${5}"))
    	}
    	return tag
    }
    
    func appendSettingFromTag(tag reflect.StructTag, value string) reflect.StructTag {
    	t := tag.Get("gorm")
    	if strings.Contains(t, value) {
    		return tag
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Sat Aug 19 13:35:14 UTC 2023
    - 5.5K bytes
    - Viewed (0)
  2. schema/utils_test.go

    	}
    
    	for k, v := range tags {
    		if string(removeSettingFromTag(reflect.StructTag(k), "column")) != v {
    			t.Errorf("%v after removeSettingFromTag should equal %v, but got %v", k, v, removeSettingFromTag(reflect.StructTag(k), "column"))
    		}
    	}
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Fri Jul 31 10:19:25 UTC 2020
    - 1.5K bytes
    - Viewed (0)
  3. api/go1.7.txt

    pkg os/user, type Group struct, Name string
    pkg os/user, type UnknownGroupError string
    pkg os/user, type UnknownGroupIdError string
    pkg reflect, func StructOf([]StructField) Type
    pkg reflect, method (StructTag) Lookup(string) (string, bool)
    pkg runtime, func CallersFrames([]uintptr) *Frames
    pkg runtime, func KeepAlive(interface{})
    pkg runtime, func SetCgoTraceback(int, unsafe.Pointer, unsafe.Pointer, unsafe.Pointer)
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Tue Jun 28 15:08:11 UTC 2016
    - 13.6K bytes
    - Viewed (0)
  4. schema/field.go

    	Scale                  int
    	IgnoreMigration        bool
    	FieldType              reflect.Type
    	IndirectFieldType      reflect.Type
    	StructField            reflect.StructField
    	Tag                    reflect.StructTag
    	TagSettings            map[string]string
    	Schema                 *Schema
    	EmbeddedSchema         *Schema
    	OwnerSchema            *Schema
    	ReflectValueOf         func(context.Context, reflect.Value) reflect.Value
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Apr 15 03:20:20 UTC 2024
    - 32K bytes
    - Viewed (0)
  5. doc/go1.17_spec.html

    which becomes an attribute for all the fields in the corresponding
    field declaration. An empty tag string is equivalent to an absent tag.
    The tags are made visible through a <a href="/pkg/reflect/#StructTag">reflection interface</a>
    and take part in <a href="#Type_identity">type identity</a> for structs
    but are otherwise ignored.
    </p>
    
    <pre>
    struct {
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Thu Oct 10 18:25:45 UTC 2024
    - 211.6K bytes
    - Viewed (0)
  6. doc/go_spec.html

    which becomes an attribute for all the fields in the corresponding
    field declaration. An empty tag string is equivalent to an absent tag.
    The tags are made visible through a <a href="/pkg/reflect/#StructTag">reflection interface</a>
    and take part in <a href="#Type_identity">type identity</a> for structs
    but are otherwise ignored.
    </p>
    
    <pre>
    struct {
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Oct 02 00:58:01 UTC 2024
    - 282.5K bytes
    - Viewed (0)
  7. api/go1.txt

    pkg reflect, type StructField struct, Offset uintptr
    pkg reflect, type StructField struct, PkgPath string
    pkg reflect, type StructField struct, Tag StructTag
    pkg reflect, type StructField struct, Type Type
    pkg reflect, type StructTag string
    pkg reflect, type Type interface, Align() int
    pkg reflect, type Type interface, AssignableTo(Type) bool
    pkg reflect, type Type interface, Bits() int
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Aug 14 18:58:28 UTC 2013
    - 1.7M bytes
    - Viewed (0)
Back to top