Last active
November 12, 2016 05:22
-
-
Save acro5piano/ad582981e8a249b14329e3e1ee31a875 to your computer and use it in GitHub Desktop.
Go言語で、外部エディタを起動する ref: http://qiita.com/acro5piano/items/69870a942ce1b5ea46ad
This file contains hidden or 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
| go run vim.go |
This file contains hidden or 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(){ | |
| cmd := exec.Command("vim", "/tmp/hoge") | |
| cmd.Stdin = os.Stdin | |
| cmd.Stdout = os.Stdout | |
| cmd.Stderr = os.Stderr | |
| cmd.Run() | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment