Documentation
¶
Overview ¶
Package platform provides platform-specific configuration paths. On macOS: ~/Library/Application Support/git-treeline/ On Linux: $XDG_CONFIG_HOME/git-treeline/ (or ~/.config/) On Windows: %APPDATA%/git-treeline/
Set GTL_HOME to override the config directory entirely. This is useful for development/testing to avoid colliding with the installed binary.
Index ¶
Constants ¶
const ( // DirMode is the permission for the git-treeline data directory. // Owner-only: the directory contains credentials (redis URLs) and // the registry that drives proxy routing. DirMode os.FileMode = 0o700 // PrivateFileMode is the permission for files that may contain // credentials or routing state (config.json, registry.json). PrivateFileMode os.FileMode = 0o600 )
Variables ¶
This section is empty.
Functions ¶
func ConfigFile ¶
func ConfigFile() string
func DevSuffix ¶
func DevSuffix() string
DevSuffix returns ".dev" when GTL_HOME is set, empty string otherwise. Used by the service layer to namespace LaunchAgent labels and pf anchors.
func EnsureConfigDir ¶
func EnsureConfigDir() error
EnsureConfigDir creates the config directory with DirMode if it doesn't exist, and tightens permissions on an existing directory if it's too open.
func IsDevMode ¶
func IsDevMode() bool
IsDevMode returns true when GTL_HOME is set, indicating this instance should use an isolated state directory.
func RegistryFile ¶
func RegistryFile() string
Types ¶
This section is empty.