Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for StructTag (0.2 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 Sep 07 09:35:13 UTC 2025
    - Last Modified: Thu Feb 13 06:16:26 UTC 2025
    - 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 Sep 07 09:35:13 UTC 2025
    - Last Modified: Fri Jul 31 10:19:25 UTC 2020
    - 1.5K bytes
    - Viewed (0)
  3. 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 Sep 07 09:35:13 UTC 2025
    - Last Modified: Wed Aug 20 04:51:17 UTC 2025
    - 32K bytes
    - Viewed (0)
Back to top