lint - 新 Go 服务上的 Arc lint 错误,解析输出时出错
问题描述
在服务上运行 arc lint
我看到这个错误
Exception
Some linters failed:
- Exception: Linter failed to parse output!
STDOUT
STDERR
<standard input>:40:1: expected statement, found 'package'
<standard input>:59:27: expected ';', found error
(Run with `--trace` for a full exception trace.)
它突然开始发生。
解决方案
我面临着类似的问题。这是解决相同问题的观察结果。每当您执行lint
时,它都会相应地自动调整代码。如果文件末尾不存在新行,请lint
复制整个文件,以便代码如下所示
package mypackage
import (
"go.uber.org/fx"
)
// Module is an FX module used when initializing the app
var Module = fx.Provide(
NewNewClient,
package mypackage
import (
"go.uber.org/fx"
)
// Module is an FX module used when initializing the app
var Module = fx.Provide(
NewNewClient,
)
请注意,此处重复了包,因此会导致问题。
推荐阅读
- javascript - 如何制作影响角度不同数据的可重用函数?
- html - 在里面放一个按钮使用 pug.js 标记
- spring-boot - 如何使用 Spring Webflux 返回 GZIP 响应?
- excel - 合并 2 个工作表并多次复制工作表 1 的所有行
- facebook - 带有 Facebook 的 Azure Web App Bot Webhook 文本始终放在 V4 上
- google-api - 为什么 Google API for QR 码现在不起作用?
- linux - 如何使用 fdisk 命名分区?
- charts - 谷歌折线图水平滚动
- python - 如何在 Mac 终端中使用命令行参数运行 exe 文件?
- php - 如何在移动视图中添加“添加到主屏幕”作为弹出窗口