Trying to say that im not incrementing the number in a fmt.Println statement, but incrementing the number, and concatenating it to a string which is label (widget_#) need the number where the # is
So then use fmt.Sprintf to create your label if you do not want to print directly but need it in a string. Alternatively you can use strconv packages functions and concatenate the strings.
Thanks, ive gotten pretty far. Now the issues that my number doesnt get incremented in the loops
func send(p chan<- widget) {
counter := 0
for i := 0; i < 10; i++ {
v := counter
v++
const label = “Widget_”
producer1 := widget{
fmt.Sprintf("%s %d", label, v),
time.Now(),
}
time.Sleep(time.Second)
p <- producer1
}
}