Can anyone help me on how to initialize an array in Go dynamically? Given is a list of items of a directory:
entries, err := d.ReadDir(-1)
count := int64(len(entries))
array = [count]string{} // invalid array length count
Assuming the goal is to write a function called:
func getFileNamesOfDirectory(path string) []string
Any help is highly appreciated.