To ignore the index and get only values, use the blank identifier:
nums := []int{10, 20, 30}
for _, v := range nums {
fmt.Println(v)
}
This prints , , . The underscore discards the index. You'll use this pattern frequently when you care about elements but not their positions.