Skip to content

Commit

Permalink
Merge pull request #3 from bbrodriges/master
Browse files Browse the repository at this point in the history
add convenient Patches constructor
  • Loading branch information
agiledragon authored Sep 16, 2018
2 parents 65668bd + d5688b7 commit 2a80388
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ func create() *Patches {
return &Patches{originals: make(map[reflect.Value][]byte), values: make(map[reflect.Value]reflect.Value)}
}

func NewPatches() *Patches {
return create()
}

func (this *Patches) ApplyFunc(target, double interface{}) *Patches {
t := reflect.ValueOf(target)
d := reflect.ValueOf(double)
Expand Down

0 comments on commit 2a80388

Please sign in to comment.