(name string, contents string)
| 443 | } |
| 444 | |
| 445 | func (t TailTest) AppendFile(name string, contents string) { |
| 446 | f, err := os.OpenFile(t.path+"/"+name, os.O_APPEND|os.O_WRONLY, 0600) |
| 447 | if err != nil { |
| 448 | t.Fatal(err) |
| 449 | } |
| 450 | defer f.Close() |
| 451 | _, err = f.WriteString(contents) |
| 452 | if err != nil { |
| 453 | t.Fatal(err) |
| 454 | } |
| 455 | } |
| 456 | |
| 457 | func (t TailTest) TruncateFile(name string, contents string) { |
| 458 | f, err := os.OpenFile(t.path+"/"+name, os.O_TRUNC|os.O_WRONLY, 0600) |
no test coverage detected