mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-12-13 23:45:45 +02:00
fix ignore feature
This commit is contained in:
@@ -174,3 +174,14 @@ func (c *OSCommand) Unquote(message string) string {
|
||||
message = strings.Replace(message, `"`, "", -1)
|
||||
return message
|
||||
}
|
||||
|
||||
func (C *OSCommand) AppendLineToFile(filename, line string) error {
|
||||
f, err := os.OpenFile(filename, os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0600)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
_, err = f.WriteString("\n" + line)
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user