(line string)
| 205 | } |
| 206 | |
| 207 | func appendHistory(line string) { |
| 208 | path := historyPath() |
| 209 | if path == "" { |
| 210 | return |
| 211 | } |
| 212 | f, err := os.OpenFile(path, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) |
| 213 | if err != nil { |
| 214 | return |
| 215 | } |
| 216 | defer f.Close() |
| 217 | fmt.Fprintln(f, line) |
| 218 | } |
no test coverage detected