I'm pretty new to golang and I have an issue with adding items to Array.
I use this link as reference golang-book.
I have this struct:
package models
type FileMD struct {
fileName string
fileSize int
}
I tired to do it in both ways but I failed.
fileList := [...]models.FileMD{"a", 1: "b", 2}
var fileList [...]models.FileMD
fileList[0] = "a", 1
What is the correct way?