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