Fix: remove unnecessary break statements

This commit is contained in:
loyalsoldier 2021-06-17 03:11:00 +08:00
parent 57b303e076
commit c61ae2d3e1
No known key found for this signature in database
GPG Key ID: 23829BBC1ACF2C90
2 changed files with 0 additions and 8 deletions

View File

@ -80,13 +80,10 @@ func (d *DefaultValueFilterChainBuilder) FilterChain(next orm.Filter) orm.Filter
switch inv.Method {
case "Insert", "InsertWithCtx":
d.handleInsert(ctx, inv)
break
case "InsertOrUpdate", "InsertOrUpdateWithCtx":
d.handleInsertOrUpdate(ctx, inv)
break
case "InsertMulti", "InsertMultiWithCtx":
d.handleInsertMulti(ctx, inv)
break
}
return next(ctx, inv)
}

View File

@ -308,7 +308,6 @@ func TestDataTypes(t *testing.T) {
case "DateTime":
case "Time":
assert.True(t, vu.(time.Time).In(DefaultTimeLoc).Sub(value.(time.Time).In(DefaultTimeLoc)) <= time.Second)
break
default:
assert.Equal(t, value, vu)
}
@ -1842,12 +1841,10 @@ func TestRawQueryRow(t *testing.T) {
switch col {
case "id":
throwFail(t, AssertIs(id, 1))
break
case "time", "datetime":
v = v.(time.Time).In(DefaultTimeLoc)
value := dataValues[col].(time.Time).In(DefaultTimeLoc)
assert.True(t, v.(time.Time).Sub(value) <= time.Second)
break
case "date":
default:
throwFail(t, AssertIs(v, dataValues[col]))
@ -1942,7 +1939,6 @@ func TestQueryRows(t *testing.T) {
case "Date":
case "DateTime":
assert.True(t, vu.(time.Time).In(DefaultTimeLoc).Sub(value.(time.Time).In(DefaultTimeLoc)) <= time.Second)
break
default:
assert.Equal(t, value, vu)
}
@ -1966,7 +1962,6 @@ func TestQueryRows(t *testing.T) {
case "Date":
case "DateTime":
assert.True(t, vu.(time.Time).In(DefaultTimeLoc).Sub(value.(time.Time).In(DefaultTimeLoc)) <= time.Second)
break
default:
assert.Equal(t, value, vu)
}