From 374ea255ecd8046cf302c62eb3a70e050908cbd9 Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Tue, 17 Apr 2018 09:57:44 +0900 Subject: [PATCH] use path/filepath instead of path --- main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 8bc8369..0bb0362 100644 --- a/main.go +++ b/main.go @@ -5,7 +5,7 @@ import ( "io/ioutil" "log" "os" - "path" + "path/filepath" "runtime" "time" @@ -65,14 +65,14 @@ func (n *PhiEditor) init(cfg *cfg.TomlConfig) { switch runtime.GOOS { case "windows": - fontFolder = path.Join(os.Getenv("%WINDIR%"), "fonts") + fontFolder = filepath.Join(os.Getenv("WINDIR"), "fonts") case "darwin": fontFolder = "/Library/Fonts/" case "linux": fontFolder = "/usr/share/fonts/" } - fontPath := path.Join(fontFolder, cfg.Editor.Font_Face) + ".ttf" + fontPath := filepath.Join(fontFolder, cfg.Editor.Font_Face) + ".ttf" font, err := strife.LoadFont(fontPath, cfg.Editor.Font_Size) if err != nil {