defenseunicorns / pkg

Common Go modules maintained by Defense Unicorns
Apache License 2.0
5 stars 4 forks source link

remove concurrency tools #70

Closed lucasrod16 closed 3 months ago

lucasrod16 commented 4 months ago

Describe what should be investigated or refactored

We should redesign and refactor ConcurrencyTools to align with concurrency best practices and idioms in Go.

The context docs state:

Do not store Contexts inside a struct type; instead, pass a Context explicitly to each function that needs it. The Context should be the first parameter, typically named ctx

https://pkg.go.dev/context#pkg-overview

We should consider what our actual use cases are and find out what pattern(s) best meet our needs.

Links to any relevant code

https://github.com/defenseunicorns/pkg/blob/main/helpers/concurrency.go

lucasrod16 commented 4 months ago

After discussing further with @Noxsios, we would like to delete all concurrency abstractions from this repo entirely because the Go standard library already has many user-friendly primitives that can be used for various use cases.

Once Zarf does not depend on ConcurrencyTools, we should delete it.