dir issue
This commit is contained in:
parent
f4fcf6f7c4
commit
9e23e7cf2b
1 changed files with 2 additions and 8 deletions
|
|
@ -8,7 +8,6 @@ import (
|
||||||
"go/token"
|
"go/token"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -56,14 +55,9 @@ func WriteFile(path string, cb func(content *ast.File) string) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define the file path where you want to save the buffer
|
// Define the file path where you want to save the buffer
|
||||||
|
process.Run("git add " + path)
|
||||||
cmd := exec.Command("git", "add", path)
|
|
||||||
err = cmd.Run()
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
log.Printf("Failed to run git add: %v\n", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Save the buffer to a file
|
// Save the buffer to a file
|
||||||
err = os.WriteFile(path, bytes, 0644)
|
err = os.WriteFile(path, bytes, 0644)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue