minor fix: incorrect apiVersion and add NoOpTransformer for vars (#757)

This commit is contained in:
Jingfang Liu
2019-02-04 09:44:33 -08:00
committed by GitHub
parent 6444981796
commit d8585334cc
3 changed files with 6 additions and 3 deletions

View File

@@ -18,6 +18,9 @@ type refvarTransformer struct {
// The fieldSpecs are the places to look for occurrences of $(VAR).
func NewRefVarTransformer(
varMap map[string]string, fs []config.FieldSpec) Transformer {
if len(varMap) == 0 {
return NewNoOpTransformer()
}
return &refvarTransformer{
fieldSpecs: fs,
mappingFunc: expansion.MappingFuncFor(varMap),