Skip to content

Commit

Permalink
Merge branch 'main' of github.com:cdk-team/CDK
Browse files Browse the repository at this point in the history
  • Loading branch information
neargle committed Oct 14, 2023
2 parents 3ff931f + c53dbdb commit c9600ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/util/file_io.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package util
import (
"bufio"
"fmt"
"io"
"io/ioutil"
"log"
"os"
Expand Down Expand Up @@ -91,7 +92,7 @@ func RewriteFile(path string, content string, perm os.FileMode) {
if err != nil {
log.Fatal("overwrite file:", path, "err: "+err.Error())
} else {
n, _ := cmdFile.Seek(0, os.SEEK_END)
n, _ := cmdFile.Seek(0, io.SeekEnd)
_, err = cmdFile.WriteAt([]byte(content), n)
log.Println("overwrite file:", path, "success.")
defer cmdFile.Close()
Expand Down

0 comments on commit c9600ae

Please sign in to comment.