Create Golang version devtool #7

Merged
oscar merged 25 commits from oscar-next into master 2022-12-29 20:34:22 +11:00
Showing only changes of commit 10544e1c2d - Show all commits

18
go/commands/git.go Normal file
View File

@ -0,0 +1,18 @@
package commands
import (
"ocl/portainer-devtool/utils"
"os/exec"
)
func ListBranches(workdir string) error {
cmd := exec.Command("git", "branch")
cmd.Dir = workdir
out, err := cmd.Output()
if err != nil {
return err
}
utils.PrintOutput("Your current checkout branch", out)
return nil
}