#output problem
3 messages · Page 1 of 1 (latest)
What is the question? What are you trying to do? What is going wrong?
Regardless, looks like your code has a bug https://www.evanjones.ca/go-gotcha-loop-variables.html
3 messages · Page 1 of 1 (latest)
func main() {
var dimensions = []string{"d1", "d2", "d3", "d4", "d5"}
var filters = []*string{}
for _, dimension := range dimensions {
filters = append(filters, &dimension)
}
for _, filter := range filters {
fmt.Println(*filter)
}
}
What is the question? What are you trying to do? What is going wrong?
Regardless, looks like your code has a bug https://www.evanjones.ca/go-gotcha-loop-variables.html