From 5078083aa80279724f834305ca52946c7114b2ca Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Mon, 16 Jan 2017 17:35:36 -0500 Subject: Pull default configuration into the application, add an edit command --- config/config_windows.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 config/config_windows.go (limited to 'config/config_windows.go') diff --git a/config/config_windows.go b/config/config_windows.go new file mode 100644 index 0000000..39b6b6c --- /dev/null +++ b/config/config_windows.go @@ -0,0 +1,22 @@ +// +build windows + +package config + +import ( + "os" + // "os/exec" + "path/filepath" +) + +var ( + editor string = setEditor() + fn string = filepath.Join(os.Getenv("LOCALAPPDATA"), configFilename) +) + +func setEditor() string { + e := os.Getenv("EDITOR") + if e == "" { + return `C:\Program Files\Windows NT\Accessories\wordpad.exe` + } + return e +} -- cgit v1.2.3