@@ -26,14 +26,16 @@ import (
2626 "sort"
2727 "strings"
2828
29- "github.com/atomist-skills/go-skill"
30- "github.com/docker/index-cli-plugin/types"
3129 v1 "github.com/google/go-containerregistry/pkg/v1"
3230 "github.com/hasura/go-graphql-client"
3331 "github.com/opencontainers/go-digest"
3432 "github.com/opencontainers/image-spec/identity"
3533 "github.com/pkg/errors"
3634 "olympos.io/encoding/edn"
35+
36+ "github.com/atomist-skills/go-skill"
37+
38+ "github.com/docker/index-cli-plugin/types"
3739)
3840
3941type ImageQueryResult struct {
@@ -117,7 +119,7 @@ func ForBaseImageInIndex(digest digest.Digest, workspace string, apiKey string)
117119 }
118120 repository , err := ForRepositoryInDb (manifestList [0 ].Name , workspace , apiKey )
119121 if err != nil {
120- return nil , errors .Wrapf (err , "failed to query for respository " )
122+ return nil , errors .Wrapf (err , "failed to query for repository " )
121123 }
122124 image := types.Image {
123125 Digest : ii .Digest ,
@@ -252,8 +254,8 @@ func ForBaseImageInGraphQL(cfg *v1.ConfigFile) (*types.BaseImagesByDiffIdsQuery,
252254 return nil , errors .Wrapf (err , "failed to run query" )
253255 }
254256 count := 0
255- for ii , _ := range q .ImagesByDiffIds {
256- for bi , _ := range q .ImagesByDiffIds [ii ].Images {
257+ for ii := range q .ImagesByDiffIds {
258+ for bi := range q .ImagesByDiffIds [ii ].Images {
257259 count ++
258260 q .ImagesByDiffIds [ii ].Images [bi ].Repository = normalizeRepository (& q .ImagesByDiffIds [ii ].Images [bi ]).Repository
259261 }
0 commit comments