This repository was archived by the owner on Nov 4, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -173,7 +173,9 @@ func (m *ModelMap) RegisterModels(models ...interface{}) error {
173173
174174 for _ , model := range m .models {
175175 model .structFieldCount = len (model .StructFields ())
176+ model .clearInitializeStoreKeys ()
176177 }
178+
177179 return nil
178180}
179181
Original file line number Diff line number Diff line change @@ -86,15 +86,15 @@ func TestValues(t *testing.T) {
8686
8787 assert .Equal (t , uint (65 ), v )
8888
89- v , err = attr .ValueFromString ("-12" )
90- require .Error (t , err )
89+ _ , err = attr .ValueFromString ("-12" )
90+ assert .Error (t , err )
9191
9292 attr , ok = mStruct .Field ("Time" )
9393 require .True (t , ok )
9494
9595 tm := time .Now ()
9696
97- v , err = attr .ValueFromString (strconv .FormatInt (tm .UnixNano (), 10 ))
97+ _ , err = attr .ValueFromString (strconv .FormatInt (tm .UnixNano (), 10 ))
9898 assert .Error (t , err )
9999
100100 attr , ok = mStruct .Field ("Flt" )
@@ -105,7 +105,7 @@ func TestValues(t *testing.T) {
105105 assert .InDelta (t , - 12.321 , v , 0.001 )
106106 }
107107
108- v , err = attr .ValueFromString ("invalid" )
108+ _ , err = attr .ValueFromString ("invalid" )
109109 assert .Error (t , err )
110110
111111 attr , ok = mStruct .Field ("Bl" )
You can’t perform that action at this time.
0 commit comments