add cmdline to config and fix fileio append

This commit is contained in:
HikariKnight 2023-04-09 16:21:27 +02:00
parent f5116648e6
commit 388ba638bd
3 changed files with 24 additions and 3 deletions

View file

@ -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()