gopls

大象笔记 > 标签 > gopls

升级 gopls 到最新版本

写了一段单元测试的代码,在 vim 中提示错误 func TestGenSlug(t *testing.T) { assert.Equal(t, "hello-world", genSlug("Hello World")) } 错误信息为: [gopls] cannot use t (variable of type *testing.T) as assert.TestingT value in argument to assert.Equal: wrong type for method Errorf (have func(format stri ...

阅读全文...