fixbug: docker append file error

This commit is contained in:
BaoXuebin 2021-12-07 22:37:03 +08:00
parent 3f57b07e8d
commit 40a2ab5036
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ func WriteFile(filePath string, content string) error {
func AppendFileInNewLine(filePath string, content string) error { func AppendFileInNewLine(filePath string, content string) error {
content = "\r\n" + content content = "\r\n" + content
file, err := os.OpenFile(filePath, os.O_APPEND, 0644) file, err := os.OpenFile(filePath, os.O_APPEND|os.O_WRONLY, os.ModeAppend)
if err == nil { if err == nil {
_, err = file.WriteString(content) _, err = file.WriteString(content)
if err != nil { if err != nil {