在新的Go服务上出现Arc lint错误,解析输出时出现错误。

问题描述 投票:1回答:1

当运行弧形绒毛的服务

我看到这个错误

 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 golint
1个回答
0
投票

我也面临类似的问题。这里是观察到的,以解决同样的问题。每当你执行 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,
)

请注意,这里重复了这个包,所以导致了这个问题。

© www.soinside.com 2019 - 2024. All rights reserved.