I would like to concurrently perform an operation on the elements of a slice  

I am using the [sync/errgroup](https://pkg.go.dev/golang.org/x/sync/errgroup) package to handle concurrency

Here is a minimal reproduction on Go Playground <https://go.dev/play/p/yBCiy8UW_80>

```golang
import (
    "fmt"
    "golang.org/x/sync/errgroup"
)

func main() {
    eg := errgroup.Group{}
    input := []int{0, 1, 2}
    output1 := []int{}
    output2 := make([]int, len(input))
    for i, n := range input {
        eg.Go(func() (err error) {
            output1 = append(output1, n+1)
            output2[i] = n + 1
            return nil
        })
    }
    eg.Wait()
    fmt.Printf("with append %+v", output1)
    fmt.Println()
    fmt.Printf("with make %+v", output2)
}

```

outputs

```
with append [3 3 3]
with make [0 0 3]

```

versus expected `[1 2 3]`