Add copy method to VarSet

This commit is contained in:
Jeffrey Regan
2019-06-07 13:01:34 -07:00
parent c9300edead
commit d9b0c4c84c
3 changed files with 14 additions and 9 deletions

View File

@@ -39,7 +39,7 @@ func (ra *ResAccumulator) ResMap() resmap.ResMap {
// Vars returns a copy of underlying vars.
func (ra *ResAccumulator) Vars() []types.Var {
return ra.varSet.Set()
return ra.varSet.AsSlice()
}
func (ra *ResAccumulator) AppendAll(
@@ -75,7 +75,7 @@ func (ra *ResAccumulator) MergeAccumulator(other *ResAccumulator) (err error) {
if err != nil {
return err
}
return ra.varSet.MergeSet(&other.varSet)
return ra.varSet.MergeSet(other.varSet)
}
// makeVarReplacementMap returns a map of Var names to