Skip to content

kotaoue/go-eeditor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

go-eeditor

Run an external editor and gets the inputs string like a behavior of 'git -commit'.
Create and delete a temporary file for passing the inputs string.

Usage

Run vim

import (
	"fmt"

	"github.com/kotaoue/go-eeditor"
)

func main() {
	editor := eeditor.NewEditor()
	b, _ := editor.Open()
	fmt.Println(string(b))
}

Run Emacs

editor := eeditor.NewEditor(eeditor.Command("emacs"))

Change Path

editor := eeditor.NewEditor(eeditor.Path("./temporary"))

Referenced links

About

Run external editor at Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages