[PR #205] fix #201: separate config #248

Open
opened 2026-02-28 14:26:24 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/devgianlu/go-librespot/pull/205
Author: @markferry
Created: 9/11/2025
Status: 🔄 Open

Base: masterHead: fix-201-separate-config


📝 Commits (4)

📊 Changes

5 files changed (+89 additions, -24 deletions)

View changed files

📝 Dockerfile (+1 -1)
📝 README.md (+11 -6)
📝 cmd/daemon/main.go (+36 -16)
cmd/daemon/os.go (+39 -0)
📝 docker-compose.pulse.yml (+2 -1)

📄 Description

Fixes #201

This moves state files from os.UserConfigDir to a user state dir by default.

The config file remains in the original location.

  • add --config flag

    • can specify a custom config file independent of state files
    • default config remains at os.UserConfigDir()
  • add --state flag

    • move default state to a state dir
      • under Unix this is ~/.local/state
      • for other OSes this is os.UserConfigDir()
    • make config_dir an alias for state

To use the old behaviour:

go run ./cmd/daemon --state $XDG_CONFIG_HOME/go-librespot

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/devgianlu/go-librespot/pull/205 **Author:** [@markferry](https://github.com/markferry) **Created:** 9/11/2025 **Status:** 🔄 Open **Base:** `master` ← **Head:** `fix-201-separate-config` --- ### 📝 Commits (4) - [`2f4f31d`](https://github.com/devgianlu/go-librespot/commit/2f4f31df94d1432dc5076c232c4b40f5180182d2) fix #201: add --config flag - [`31e3e62`](https://github.com/devgianlu/go-librespot/commit/31e3e62ab18a62eb51e9628532a6b42f71aec830) add --state flag - [`ca428a3`](https://github.com/devgianlu/go-librespot/commit/ca428a31d1701512d6eafe626b94a2ca64474669) add UserStateDir implementation - [`2b54b74`](https://github.com/devgianlu/go-librespot/commit/2b54b746476b296b4f52dddbbd23dabb88e56527) update Docker files ### 📊 Changes **5 files changed** (+89 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `Dockerfile` (+1 -1) 📝 `README.md` (+11 -6) 📝 `cmd/daemon/main.go` (+36 -16) ➕ `cmd/daemon/os.go` (+39 -0) 📝 `docker-compose.pulse.yml` (+2 -1) </details> ### 📄 Description Fixes #201 This moves state files from `os.UserConfigDir` to a user state dir by default. The config file remains in the original location. - **add --config flag** - can specify a custom config file independent of state files - default config remains at `os.UserConfigDir()` - **add --state flag** - move default state to a state dir - under Unix this is `~/.local/state` - for other OSes this is `os.UserConfigDir()` - make `config_dir` an alias for `state` To use the old behaviour: ```bash go run ./cmd/daemon --state $XDG_CONFIG_HOME/go-librespot ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/go-librespot#248
No description provided.