func (e *Editor) Open(o openable) error {
	args := append(e.GetArgs(o.GetFileCursorLine()), o.GetFilePath())
	cmd := exec.Command(e.Cmd, args...)
	cmd.Stdout = os.Stdout
	cmd.Stdin = os.Stdin
	cmd.Stderr = os.Stderr
	return cmd.Run()
}
Open opens an object satisfying the openable interface in the editor
NOTE: it is recommended to use Go >= v.1.15.7 due to call to exec.Command()
See: https://blog.golang.org/path-security
package editor
import (
	"fmt"
	"os"
	"os/exec"
)
const EnvEditor = "EDITOR"
const (
	editorNameEmacs  = "emacs"
	editorNameNano   = "nano"
	editorNameNeovim = "nvim"
	editorNameVi     = "vi"
	editorNameVim    = "vim"
)
type openable interface {
	GetFilePath() string
	GetFileCursorLine() int
}
type Editor struct {
	Cmd       string
	GetArgs   func(int) []string
	Supported bool
	Default   bool
}