@@ -203,9 +203,9 @@ func (inv *Inventory) read(manifestsPath string) error {
203203 // Split the rest of the file into the manifests
204204 manfestsBytes = fileSplit [1 ]
205205
206- manifests := bytes .Split (manfestsBytes , []byte ("---\n # [CHK_VERSIONS]: " ))
206+ manifests := bytes .SplitSeq (manfestsBytes , []byte ("---\n # [CHK_VERSIONS]: " ))
207207
208- for _ , manifest := range manifests {
208+ for manifest := range manifests {
209209 if len (manifest ) == 0 {
210210 continue
211211 }
@@ -232,8 +232,8 @@ func (inv *Inventory) read(manifestsPath string) error {
232232 manifestHash := hex .EncodeToString (manifestHasher .Sum ([]byte {}))
233233
234234 // Split the versions
235- versionsSplit := strings .Split (versions , "," )
236- for _ , version := range versionsSplit {
235+ versionsSplit := strings .SplitSeq (versions , "," )
236+ for version := range versionsSplit {
237237 version = strings .TrimSpace (version )
238238 version = semver .Canonical (version )
239239
@@ -385,7 +385,7 @@ func cleanupManifests(manifests []byte, version string) ([]byte, error) {
385385
386386 decoder := yaml .NewDecoder (bytes .NewBuffer (manifests ))
387387 for {
388- var manifest map [string ]interface {}
388+ var manifest map [string ]any
389389
390390 err := decoder .Decode (& manifest )
391391 if errors .Is (err , io .EOF ) {
@@ -407,10 +407,10 @@ func cleanupManifests(manifests []byte, version string) ([]byte, error) {
407407 case "CustomResourceDefinition" :
408408 // remove all CRD schemas from yaml file
409409 switch spec := manifest ["spec" ].(type ) {
410- case map [string ]interface {} :
411- spec ["versions" ] = []interface {} {}
412- case map [interface {}] interface {} :
413- spec ["versions" ] = []interface {} {}
410+ case map [string ]any :
411+ spec ["versions" ] = []any {}
412+ case map [any ] any :
413+ spec ["versions" ] = []any {}
414414 }
415415
416416 // remove status from CRD
0 commit comments