Skip to content

Commit 15e7c21

Browse files
committed
Fix lint CI: replace slices.Insert with manual slice insertion
The slices package requires Go 1.21+ but go.mod specifies Go 1.18. This caused golangci-lint to fail resolving the import, cascading into typecheck errors across the codebase.
1 parent 12888bb commit 15e7c21

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

sdk/provisioner.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"context"
55
"encoding/json"
66
"path/filepath"
7-
"slices"
87
"time"
98
)
109

@@ -110,7 +109,7 @@ func (out *ProvisionOutput) AddArgs(args ...string) {
110109

111110
// PrependArgs can be used to insert additional arguments at the beginning of the command line of the provision output.
112111
func (out *ProvisionOutput) PrependArgs(args ...string) {
113-
out.CommandLine = slices.Insert(out.CommandLine, 1, args...)
112+
out.CommandLine = append(out.CommandLine[:1], append(args, out.CommandLine[1:]...)...)
114113
}
115114

116115
// AddSecretFile can be used to add a file containing secrets to the provision output.

0 commit comments

Comments
 (0)