xdg

package
v0.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package xdg resolves XDG base directories with home-directory fallbacks, so cuttle's config and data paths are derived in one place instead of each package repeating the fallback ladder.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheDir added in v0.5.3

func CacheDir() string

CacheDir is $XDG_CACHE_HOME, or ~/.cache when unset.

func ConfigDir

func ConfigDir() string

ConfigDir is $XDG_CONFIG_HOME, or ~/.config when unset. It returns "" only if the env var is unset and the home directory cannot be determined.

func DataDir

func DataDir() string

DataDir is $XDG_DATA_HOME, or ~/.local/share when unset.

func StateDir added in v0.7.0

func StateDir() string

StateDir is $XDG_STATE_HOME, or ~/.local/state when unset.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL