Skip to content

Commit

Permalink
Remove convertMap from buildx
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuabezaleel committed Feb 22, 2022
1 parent 9b4e8a0 commit 7fe1dea
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions pkg/build/buildkit/buildx.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,28 +220,3 @@ func (b *Builder) TagInvocationImage(ctx context.Context, origTag, newTag string
}
return nil
}

func convertMap(mapInput map[string]interface{}) (map[string]string, error) {
out := make(map[string]string)
for key, value := range mapInput {
switch v := value.(type) {
case string:
out[key] = v
case map[string]interface{}:
tmp, err := convertMap(v)
if err != nil {
return nil, err
}
for innerKey, innerValue := range tmp {
out[key+"."+innerKey] = innerValue
}
case map[string]string:
for innerKey, innerValue := range v {
out[key+"."+innerKey] = innerValue
}
default:
return nil, errors.Errorf("Unknown type %#v: %t", v, v)
}
}
return out, nil
}

0 comments on commit 7fe1dea

Please sign in to comment.