Consider the following two code fragments:
os_list := []string{"Mac OSX", "Linux", "Windows 7"}
fmt.Println(os_list)
os_list_two := make([]string, 3)
os_list_two = append(os_list_two, "Mac OSX", "Linux", "Windows 7")
fmt.Println(os_list_two)
When should we use one or the other?
source
share