in this code I want the whole developers slice to be printed in one line. But here is a problem, after using the loop, the slice is divided in multiple times and the {"first project", ...} is repeating multiple times.
Required result
[[first developer second developer third developer] [forth developer fifth developer sixth developer] [first project second project third project forth project]]
Given result
[[first developer second developer third developer] [first project second project third project forth project]]
[[forth developer fifth developer sixth developer] [first project second project third project forth project]]
Code
package main
import "fmt"
func main() {
developers := [][]string{
{"first developer", "second developer", "third developer"},
{"forth developer", "fifth developer", "sixth developer"},
}
for i := 0; i < 2; i++ {
data := [][]string{developers[i], {"first project", "second project", "third project", "forth project"}}
fmt.Println(data)
}
}