Cleanup unused function
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
This commit is contained in:
Родитель
6f5f3154d0
Коммит
15c4595296
|
@ -108,21 +108,13 @@ func mergeBundleParameters(installation *store.Installation, ops ...mergeBundleO
|
|||
return err
|
||||
}
|
||||
|
||||
func getParameterFromBundle(name string, bndl *bundle.Bundle) (bundle.Parameter, bool) {
|
||||
if bndl.Parameters == nil {
|
||||
return bundle.Parameter{}, false
|
||||
}
|
||||
param, found := bndl.Parameters[name]
|
||||
return param, found
|
||||
}
|
||||
|
||||
func matchAndMergeParametersDefinition(currentValues map[string]interface{}, cfg *mergeBundleConfig) (map[string]interface{}, error) {
|
||||
mergedValues := make(map[string]interface{})
|
||||
for k, v := range currentValues {
|
||||
mergedValues[k] = v
|
||||
}
|
||||
for k, v := range cfg.params {
|
||||
param, ok := getParameterFromBundle(k, cfg.bundle)
|
||||
param, ok := cfg.bundle.Parameters[k]
|
||||
if !ok {
|
||||
if cfg.strictMode {
|
||||
return nil, fmt.Errorf("parameter %q is not defined in the bundle", k)
|
||||
|
|
|
@ -65,7 +65,7 @@ func TestWithCommandLineParameters(t *testing.T) {
|
|||
type bundleOperator func(*bundle.Bundle)
|
||||
|
||||
func prepareBundleWithParameters(b *bundle.Bundle) {
|
||||
if b.Parameters != nil && len(b.Parameters) > 0 {
|
||||
if b.Parameters != nil {
|
||||
return
|
||||
}
|
||||
b.Parameters = map[string]bundle.Parameter{}
|
||||
|
|
Загрузка…
Ссылка в новой задаче