1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00

Can find the biggest diffs

This commit is contained in:
Zack Scholl
2016-02-09 17:52:52 -05:00
parent 825139b9a1
commit 594360fe7a
4 changed files with 46 additions and 13 deletions

2
db.go
View File

@ -156,7 +156,7 @@ func (p *CowyoData) save(newText string) error {
diffs := dmp.DiffMain(p.CurrentText, newText, true)
delta := dmp.DiffToDelta(diffs)
p.CurrentText = newText
p.Timestamps = append(p.Timestamps, time.Now().String())
p.Timestamps = append(p.Timestamps, time.Now().Format(time.ANSIC))
p.Diffs = append(p.Diffs, delta)
enc, err := p.encode()
if err != nil {