SetText updates the file's content, lines, and history.
(s string)
| 280 | |
| 281 | // SetText updates the file's content, lines, and history. |
| 282 | func (f *File) SetText(s string) { |
| 283 | f.Content = s |
| 284 | f.Lines = strings.SplitAfter(s, "\n") |
| 285 | f.history = map[string]int{} |
| 286 | } |
| 287 | |
| 288 | // SetNormedExt sets the normalized extension of a File. |
| 289 | func (f *File) SetNormedExt(ext string) { |
no outgoing calls
no test coverage detected