Commit 28ebd705 authored by Sandeep S. Shewalkar's avatar Sandeep S. Shewalkar
Browse files

changes inside Append function

os.O_CREATE added for append function
parent 6d34402b
Branches
1 merge request!42changes inside Append function
Showing with 1 addition and 1 deletion
......@@ -35,7 +35,7 @@ func WriteFile(filePath string, data []byte) error {
//AppendFile appends prvided data/text to file
func AppendFile(filename string, text string) (int, error) {
f, err := os.OpenFile(filename, os.O_APPEND|os.O_WRONLY, 0600)
f, err := os.OpenFile(filename, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0600)
if err != nil {
return 0, err
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment