String returns a git diff representation of this file. The value can be parsed by this library to obtain the same File, but may not be the same as the original input.
()
| 43 | // parsed by this library to obtain the same File, but may not be the same as |
| 44 | // the original input. |
| 45 | func (f *File) String() string { |
| 46 | var diff strings.Builder |
| 47 | newFormatter(&diff).FormatFile(f) |
| 48 | return diff.String() |
| 49 | } |
| 50 | |
| 51 | // TextFragment describes changed lines starting at a specific line in a text file. |
| 52 | type TextFragment struct { |