Problem scenario
Lists have a fixed length number of discrete items. You want the items in the list to be strings. How do you create a list of strings in Golang?
Solution
1. Use this program called animal.go:
package main
import “fmt”
func main() {
var x [10]string
x[0] = “dog”
x[1] = “cat”
x[2] = “hamster”
x[3] = “rabbit”
x[4] = “chicken”
for i := 0; …
Continue reading “How Do You Create a List of Strings in Golang?”