fix: enable len rule from testifylint in module component-base

This commit is contained in:
tuhui1 2024-12-24 17:23:51 +08:00
parent 35f584187a
commit f47e6d0428

View File

@ -98,7 +98,7 @@ func TestZapLoggerInfo(t *testing.T) {
logStrLines := strings.Split(logStr, "\n")
dataFormatLines := strings.Split(data.format, "\n")
if !assert.Equal(t, len(logStrLines), len(dataFormatLines)) {
if !assert.Len(t, logStrLines, len(dataFormatLines)) {
t.Errorf("Info has wrong format: no. of lines in log is incorrect \n expect:%d\n got:%d", len(dataFormatLines), len(logStrLines))
}