Add dockerfile, add data directory flag
This commit is contained in:
parent
1f5dd7a5e0
commit
284a35ab09
9 changed files with 81 additions and 62 deletions
|
@ -7,19 +7,15 @@ import (
|
|||
"path"
|
||||
|
||||
"github.com/khlieng/name_pending/Godeps/_workspace/src/github.com/spf13/cobra"
|
||||
|
||||
"github.com/khlieng/name_pending/storage"
|
||||
)
|
||||
|
||||
var (
|
||||
editors = []string{"nano", "notepad", "vi", "emacs"}
|
||||
|
||||
configCmd = &cobra.Command{
|
||||
Use: "config",
|
||||
Short: "Edit config file",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
if editor := findEditor(); editor != "" {
|
||||
process := exec.Command(editor, path.Join(storage.AppDir, "config.toml"))
|
||||
process := exec.Command(editor, path.Join(appDir, "config.toml"))
|
||||
process.Stdin = os.Stdin
|
||||
process.Stdout = os.Stdout
|
||||
process.Stderr = os.Stderr
|
||||
|
@ -29,6 +25,8 @@ var (
|
|||
}
|
||||
},
|
||||
}
|
||||
|
||||
editors = []string{"nano", "notepad", "vi", "emacs"}
|
||||
)
|
||||
|
||||
func findEditor() string {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue