Open
Description
In scenarios where header names are randomly generated from an external source, it would be beneficial to unmarshal the CSV into a struct using the header index. Another scenario is when people use cleaning tools in the project (e.g., field alignment), the tool can reorganize the structs, making it difficult to maintain an exact order.
Struct example:
type User struct {
Name string `index:"0"`
Age int `index:"1"`
}
CSV example:
ax9KEfo,lo20dUta
James,22
Victoria,31