Created
July 12, 2012 00:08
-
-
Save kisielk/3094615 to your computer and use it in GitHub Desktop.
Spawning an editor from within a Go program
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"os" | |
"os/exec" | |
) | |
func main() { | |
c := exec.Command("vim") | |
c.Stdout = os.Stdout | |
c.Stdin = os.Stdin | |
c.Run() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment