The R004 analyzer reports incorrect types for a Set()
call value.
The Set()
function only supports a subset of basic types, slices and maps of that
subset of basic types, and the schema.Set
type.
var t time.Time
d.Set("example", t)
var t time.Time
d.Set("example", t.Format(time.RFC3339))
Singular reports can be ignored by adding the a //lintignore:R004
Go code comment at the end of the offending line or on the line immediately proceding, e.g.
var t time.Time
//lintignore:R004
d.Set("example", t)