userdirs

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package userdirs resolves the per-user directories where the Entire CLIs keep global state. It is the single implementation of that resolution — don't derive ~/.config/entire or ~/.cache/entire paths anywhere else.

  • Config: contexts.json, version_check.json, the file-backed token store. $ENTIRE_CONFIG_DIR if set, else ~/.config/entire.
  • Cache: discovery caches (nodes.json, cluster_cores.json, api_discovery.json). $XDG_CACHE_HOME/entire if set, else ~/.cache/entire.

Under `go test`, both fall back to a throwaway per-process directory when their env override is unset (see internal/testdirs), so a test that forgets to isolate can never read or pollute the developer's real state.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cache

func Cache() string

Cache returns the per-user cache directory.

func Config

func Config() string

Config returns the per-user config directory.

Types

This section is empty.

Jump to

Keyboard shortcuts

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