Golang:我将如何编写一个打开并允许用户编辑文本文件,然后继续运行的函子[关闭]

I'm in the process of writing a program that will open a .txt file, and allow the user to edit the file, then save it. I'm not really sure how to go about writing a func that opens a text editor(TextEdit, Cat, VIM, w/e) halfway through the program, waits for a user to make changes to that file, then continues running once those changes are complete. Is go capable of doing this? Any suggestions/examples would be appreciated.

This really doesn't have anything to do with go specifically, you start the process, wait for it to exit and then do your thing:

cmd := exec.Command("vim", "file.txt")
if cmd.Run() != nil {
    //vim didn't exit with status code 0
} else {
    //it worked, do stuff with file.txt
}