konbata/utils.go

14 lines
202 B
Go
Raw Normal View History

2021-08-11 10:49:59 +00:00
package main
import (
"os"
"path/filepath"
)
func xdgDataHome() string {
if s, ok := os.LookupEnv("XDG_DATA_HOME"); ok {
return s
}
return filepath.Join(os.Getenv("HOME"), ".local", "share")
}