refactor edit to remove cobra dependency and also make it reusable

This commit is contained in:
AdoHe
2017-04-18 20:44:25 +08:00
parent eccba3b6d0
commit 5ed1ab66a2
9 changed files with 733 additions and 606 deletions

View File

@@ -160,7 +160,7 @@ func (o *SetLastAppliedOptions) Validate(f cmdutil.Factory, cmd *cobra.Command)
}
//only add to PatchBufferList when changed
if !bytes.Equal(stripComments(oringalBuf), stripComments(diffBuf)) {
if !bytes.Equal(cmdutil.StripComments(oringalBuf), cmdutil.StripComments(diffBuf)) {
o.PatchBufferList = append(o.PatchBufferList, patchBuf)
o.InfoList = append(o.InfoList, info)
} else {