Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 package git | |
| 2 | |
| 3 import "fmt" | |
| 4 import "strings" | |
| 5 | |
| 6 func (r *Repo) GetTextDiff(left, right string) []string { | |
|
M-A Ruel
2014/10/18 00:47:05
Why not implement in repo.go or where ever you def
M-A Ruel
2014/10/18 00:47:05
Why []string instead of string?
iannucci
2014/10/20 21:11:57
Fair enough.
iannucci
2014/10/20 21:11:57
Done.
| |
| 7 rslt, ok := r.Run("diff", left, right) | |
| 8 if !ok { | |
| 9 panic(fmt.Errorf("cannot diff(%s, %s): %s", left, right, rslt)) | |
|
M-A Ruel
2014/10/18 00:47:05
No, change the signature to return ([]string, erro
iannucci
2014/10/20 21:11:57
Done.
| |
| 10 } | |
| 11 return strings.Split(rslt, "\n") | |
|
M-A Ruel
2014/10/18 00:47:05
return strings.Split(rslt, "\n"), nil
iannucci
2014/10/20 21:11:57
Done.
| |
| 12 } | |
| OLD | NEW |