Ejemplo n.º 1
0
func getMessageFromEditor(app *kp.Application, repoPath string) string {
	editor := gg.ConfiguredEditor(repoPath)
	file, err := ioutil.TempFile("", "gitc")
	app.FatalIfError(err, "io")
	path := file.Name()
	file.Write(commentTemplateText(app, repoPath))
	file.Close()
	err = gx.ExecCommand(editor, path)
	app.FatalIfError(err, "io")
	content, err := ioutil.ReadFile(path)
	os.Remove(path)
	app.FatalIfError(err, "io")
	return sanitizeMessage(app, string(content))
}
Ejemplo n.º 2
0
func main() {
	gx.ExecCommand("echo", "Not yet implemented :)")
}