aboutsummaryrefslogtreecommitdiff
path: root/config/config_windows.go
blob: 39b6b6ce5dbacfae7122b061613e2039f6d754d9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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
}