File: xdg_linux.go

package info (click to toggle)
golang-github-openpeedeep-xdg 0.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 116 kB
  • sloc: makefile: 2
file content (30 lines) | stat: -rw-r--r-- 723 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (c) 2017, OpenPeeDeeP. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package xdg

import (
	"os"
	"path/filepath"
)

func (o *osDefaulter) defaultDataHome() string {
	return filepath.Join(os.Getenv("HOME"), ".local", "share")
}

func (o *osDefaulter) defaultDataDirs() []string {
	return []string{"/usr/local/share/", "/usr/share/"}
}

func (o *osDefaulter) defaultConfigHome() string {
	return filepath.Join(os.Getenv("HOME"), ".config")
}

func (o *osDefaulter) defaultConfigDirs() []string {
	return []string{"/etc/xdg"}
}

func (o *osDefaulter) defaultCacheHome() string {
	return filepath.Join(os.Getenv("HOME"), ".cache")
}