Help us shape the future of Go! Take the 2026 Go Developer Survey

xdg

package
v0.37.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package xdg resolves XDG Base Directory locations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StateHome

func StateHome(getenv func(string) string, home string) string

StateHome returns the base directory for user state files: XDG_STATE_HOME when it is set to an absolute path, else home/.local/state. A relative or empty value is ignored, as the XDG Base Directory specification requires. getenv is injected so callers and tests never touch the process environment.

Types

This section is empty.

Jump to

Keyboard shortcuts

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