Documentation
¶
Overview ¶
Package statepath provides helpers for resolving OSS state directory paths with one-release backward-compat migration from ~/.rensei/ to ~/.donmai/.
Migration policy:
- Canonical path is ~/.donmai/<file>
- If ~/.donmai/ does not exist but ~/.rensei/ does, the legacy path is returned with a one-time stderr warning.
- Once ~/.donmai/ exists, the legacy path is ignored.
- New writes always go to ~/.donmai/.
- ~/Library/Logs/rensei/ is shared with the closed-source rensei binary and is NOT migrated here.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Resolve ¶
Resolve returns the path to use for a state file under the ~/.donmai/ directory, with a one-release fallback to ~/.rensei/ if the new directory does not yet exist.
fallbackSuffix is the path suffix under the home dir, e.g. "daemon.yaml". The function constructs both ~/.donmai/<suffix> and ~/.rensei/<suffix>, checks which base directory exists, and returns the appropriate path.
tmpFallback is used when os.UserHomeDir() fails (e.g. in some test envs).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.