remove old patch method

This commit is contained in:
filifa 2024-07-09 23:51:44 -05:00
parent 0cd2bcd4e9
commit 542c2850a7
1 changed files with 0 additions and 20 deletions

View File

@ -98,23 +98,3 @@ func (f *FeedResponse) Patch(instr *instruction) {
if err != nil { if err != nil {
} }
} }
func (p *Play) Patch(patch Patch) {
instructions := patch.Diff
stem := "/liveData/plays/currentPlay"
for _, i := range instructions {
if i.Op == "add" && i.Path == stem+"/result/description" {
p.Result.Description = i.Value.(string)
} else if i.Op == "replace" && i.Path == stem+"/about/isScoringPlay" {
p.About.IsScoringPlay = i.Value.(bool)
} else if i.Op == "replace" && i.Path == stem+"/result/homeScore" {
p.Result.HomeScore = int(i.Value.(float64))
} else if i.Op == "replace" && i.Path == stem+"/result/awayScore" {
p.Result.AwayScore = int(i.Value.(float64))
} else if i.Op == "add" && i.Path == stem+"/result/event" {
p.Result.Event = i.Value.(string)
} else if i.Op == "replace" && i.Path == stem+"/atBatIndex" {
p.AtBatIndex = int(i.Value.(float64))
}
}
}