add cmdline to config and fix fileio append
This commit is contained in:
parent
f5116648e6
commit
388ba638bd
3 changed files with 24 additions and 3 deletions
|
@ -12,7 +12,7 @@ import (
|
|||
|
||||
func AppendContent(content string, fileName string) {
|
||||
// Open the file
|
||||
f, err := os.OpenFile(fileName, os.O_APPEND|os.O_WRONLY, os.ModePerm)
|
||||
f, err := os.OpenFile(fileName, os.O_CREATE|os.O_APPEND|os.O_WRONLY, os.ModePerm)
|
||||
errorcheck.ErrorCheck(err, fmt.Sprintf("Error opening \"%s\" for writing", fileName))
|
||||
defer f.Close()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue