简体   繁体   English

“文件不是使用 --skip-generated -s standard,default (gci) 进行 `gci` 编辑”的含义

[英]Meaning of "File is not `gci`-ed with --skip-generated -s standard,default (gci)"

I get this error message:我收到此错误消息:

main.go:24: File is not `gci`-ed with --skip-generated -s standard,default (gci)
import (

What does this mean?这是什么意思?

Background: I am new to Go, and the linting was not set up by me.背景:我是Go新手,linting不是我设置的。 I confess that I don't know the actual linter which creates this warning.我承认我不知道创建此警告的实际 linter。

About gci关于gci

GCI, a tool that control golang package import order and make it always deterministic. GCI,一种控制 golang package 导入顺序并使其始终具有确定性的工具。

This solved the above warning for me:这为我解决了上述警告:

gci write --skip-generated -s standard,default .

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM