The R001 analyzer reports a complex key argument for a Set()
call. It is preferred to explicitly use a string literal as the key argument.
keys := []string{"example1", "example2"}
values := []string{"value1", "value2"}
for idx, key := range keys {
d.Set(key, values[idx])
}
d.Set("example1", "value1")
d.Set("example2", "value2")
Singular reports can be ignored by adding the a //lintignore:R001
Go code comment at the end of the offending line or on the line immediately proceding, e.g.
keys := []string{"example1", "example2"}
values := []string{"value1", "value2"}
for idx, key := range keys {
//lintignore:R001
d.Set(key, values[idx])
}