The structure is
type TopicModels struct {
Topics []string
}
And I want to set the value into this structure like following approach
var topics [2]string
topics[0] = "Sport Nice"
topics[1] = "Nice Sport"
return &TopicModels{Topics: topics}, nil
However, it tells me that
cannot use topics (type [2]string) as type []string in field value
How can I change the code to make it correct?