浏览代码

fix(meta): return read error in forbidden_words_test (#9706)

When reading a file fails, the error is currently swallowed / hidden.
Probably just a typo.
André Colomb 1 年之前
父节点
当前提交
0b95c5fa76
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      meta/forbidden_words_test.go

+ 1 - 1
meta/forbidden_words_test.go

@@ -35,7 +35,7 @@ func TestForbiddenWords(t *testing.T) {
 
 			bs, err := os.ReadFile(path)
 			if err != nil {
-				return nil
+				return err
 			}
 
 			for _, word := range forbiddenWords {