Skip to content

Test program in Go to demonstrate opening a file with $EDITOR and capture input

Notifications You must be signed in to change notification settings

halkyon/go-editor-capture-input

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

What is this?

A demonstration of using command line execution in Golang to open a file with $EDITOR, and then read back the contents once the file has been closed by the editor.

Examples of where this is useful is for interactively editing application configuration files. Kubernetes does this with the kubectl edit command, for example.

Usage

go get github.com/halkyon/go-open-with-editor

$ go-open-with-editor

This will create a temporary file test12345.txt in your system temp path.

About

Test program in Go to demonstrate opening a file with $EDITOR and capture input

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages