1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00

Merge pull request #198 from antham/fix-various-errors

Fix various errors reported by goreportcard
This commit is contained in:
Jesse Duffield
2018-08-22 09:28:19 +10:00
committed by GitHub
3 changed files with 6 additions and 13 deletions

View File

@ -175,7 +175,8 @@ func (c *OSCommand) Unquote(message string) string {
return message
}
func (C *OSCommand) AppendLineToFile(filename, line string) error {
// AppendLineToFile adds a new line in file
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