admin管理员组文章数量:1125335
I have a CSV import endpoint that receives a CSV file without a header. To determine which value corresponds to which field, I use the index. I created a struct to convert the CSV into objects in Go.
The problem is that I need the struct fields to be in the exact order of the CSV to get the correct values. However, when I run "fieldalignment -fix ./...", all structs are reorganized. I'm looking for a way to ignore a specific struct or file in the entire project.
I already using tried "//nolint:all" without success.
本文标签: golintIgnore file or struct from quotfieldalignmentquot in GoStack Overflow
版权声明:本文标题:golint - Ignore file or struct from "fieldalignment" in Go - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736641655a1946008.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论