mock datastore tests (#562)

This commit is contained in:
Jordan Krage
2017-03-02 00:04:04 -06:00
committed by Travis Reeder
parent 947fedb194
commit 17e18d872b
5 changed files with 97 additions and 54 deletions

View File

@@ -125,6 +125,14 @@ func (r *Route) Validate() error {
return nil
}
func (r *Route) Clone() *Route {
var clone Route
clone.AppName = r.AppName
clone.Path = r.Path
clone.Update(r)
return &clone
}
// Update updates fields in r with non-zero field values from new.
// 0-length slice Header values, and empty-string Config values trigger removal of map entry.
func (r *Route) Update(new *Route) {