Skip to content

Commit e9e51ac

Browse files
committed
Remove xdgPath and xdgPaths functions
1 parent 28fbf4c commit e9e51ac

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

xdg.go

-21
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
package xdg
22

33
import (
4-
"os"
5-
"path/filepath"
6-
74
"github.com/adrg/xdg/internal/pathutil"
85
)
96

@@ -198,21 +195,3 @@ func SearchCacheFile(relPath string) (string, error) {
198195
func SearchRuntimeFile(relPath string) (string, error) {
199196
return baseDirs.searchRuntimeFile(relPath)
200197
}
201-
202-
func xdgPath(name string, defaultPaths ...string) string {
203-
dir := pathutil.ExpandHome(os.Getenv(name))
204-
if dir != "" && filepath.IsAbs(dir) {
205-
return dir
206-
}
207-
208-
return pathutil.First(defaultPaths)
209-
}
210-
211-
func xdgPaths(name string, defaultPaths ...string) []string {
212-
dirs := pathutil.Unique(filepath.SplitList(os.Getenv(name)))
213-
if len(dirs) != 0 {
214-
return dirs
215-
}
216-
217-
return pathutil.Unique(defaultPaths)
218-
}

0 commit comments

Comments
 (0)