diff --git a/paths_windows_test.go b/paths_windows_test.go index 721d92b..bd08043 100644 --- a/paths_windows_test.go +++ b/paths_windows_test.go @@ -21,49 +21,49 @@ func TestDefaultBaseDirs(t *testing.T) { winDir := `C:\Windows` envSamples := []*envSample{ - &envSample{ + { name: "XDG_DATA_HOME", expected: localAppData, actual: &xdg.DataHome, }, - &envSample{ + { name: "XDG_DATA_DIRS", expected: []string{roamingAppData, programData}, actual: &xdg.DataDirs, }, - &envSample{ + { name: "XDG_CONFIG_HOME", expected: localAppData, actual: &xdg.ConfigHome, }, - &envSample{ + { name: "XDG_CONFIG_DIRS", expected: []string{programData}, actual: &xdg.ConfigDirs, }, - &envSample{ + { name: "XDG_CACHE_HOME", expected: filepath.Join(localAppData, "cache"), actual: &xdg.CacheHome, }, - &envSample{ + { name: "XDG_RUNTIME_DIR", expected: localAppData, actual: &xdg.RuntimeDir, }, - &envSample{ + { name: "XDG_STATE_HOME", expected: localAppData, actual: &xdg.StateHome, }, - &envSample{ + { name: "XDG_APPLICATION_DIRS", expected: []string{ filepath.Join(roamingAppData, "Microsoft", "Windows", "Start Menu", "Programs"), }, actual: &xdg.ApplicationDirs, }, - &envSample{ + { name: "XDG_FONT_DIRS", expected: []string{ filepath.Join(winDir, "Fonts"), @@ -170,42 +170,42 @@ func TestDefaultUserDirs(t *testing.T) { public := filepath.Join(home, "Public") samples := []*envSample{ - &envSample{ + { name: "XDG_DESKTOP_DIR", expected: filepath.Join(home, "Desktop"), actual: &xdg.UserDirs.Desktop, }, - &envSample{ + { name: "XDG_DOWNLOAD_DIR", expected: filepath.Join(home, "Downloads"), actual: &xdg.UserDirs.Download, }, - &envSample{ + { name: "XDG_DOCUMENTS_DIR", expected: filepath.Join(home, "Documents"), actual: &xdg.UserDirs.Documents, }, - &envSample{ + { name: "XDG_MUSIC_DIR", expected: filepath.Join(home, "Music"), actual: &xdg.UserDirs.Music, }, - &envSample{ + { name: "XDG_PICTURES_DIR", expected: filepath.Join(home, "Pictures"), actual: &xdg.UserDirs.Pictures, }, - &envSample{ + { name: "XDG_VIDEOS_DIR", expected: filepath.Join(home, "Videos"), actual: &xdg.UserDirs.Videos, }, - &envSample{ + { name: "XDG_TEMPLATES_DIR", expected: filepath.Join(home, "Templates"), actual: &xdg.UserDirs.Templates, }, - &envSample{ + { name: "XDG_PUBLICSHARE_DIR", expected: public, actual: &xdg.UserDirs.PublicShare,