diff --git a/cmd/builder/internal/builder/main.go b/cmd/builder/internal/builder/main.go index 3c62bd3ff1e..ba54c40e591 100644 --- a/cmd/builder/internal/builder/main.go +++ b/cmd/builder/internal/builder/main.go @@ -10,6 +10,7 @@ import ( "os" "os/exec" "path/filepath" + "slices" "strings" "text/template" "time" @@ -221,13 +222,8 @@ func (c *Config) coreModuleAndVersion() (string, string) { } func (c *Config) allComponents() []Module { - // TODO: Use slices.Concat when we drop support for Go 1.21 - return append(c.Exporters, - append(c.Receivers, - append(c.Processors, - append(c.Extensions, - append(c.Connectors, - *c.Providers...)...)...)...)...) + return slices.Concat[[]Module](c.Exporters, c.Receivers, c.Processors, + c.Extensions, c.Connectors, *c.Providers) } func (c *Config) readGoModFile() (string, map[string]string, error) {