[PR #105] [MERGED] Small fixes to the configdir code #210

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

📋 Pull Request Information

Original PR: https://github.com/devgianlu/go-librespot/pull/105
Author: @aykevl
Created: 10/1/2024
Status: Merged
Merged: 10/1/2024
Merged by: @devgianlu

Base: masterHead: configdir-fixes


📝 Commits (3)

  • a2b135b feat: use lockfile to avoid multiple go-librespot instances
  • 857d768 fix: use nice formatting in state.json
  • f7ebe58 fix: make writeAppState atomic

📊 Changes

3 files changed (+84 additions, -27 deletions)

View changed files

📝 cmd/daemon/main.go (+48 -5)
📝 go.mod (+9 -5)
📝 go.sum (+27 -17)

📄 Description

  • Add locking so no two go-librespot processes can use the same configdir
  • Use indentation in state.json
  • Hopefully fix some atomicity issues when overwriting the state file

See also the discussion in #103.


🔄 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/105 **Author:** [@aykevl](https://github.com/aykevl) **Created:** 10/1/2024 **Status:** ✅ Merged **Merged:** 10/1/2024 **Merged by:** [@devgianlu](https://github.com/devgianlu) **Base:** `master` ← **Head:** `configdir-fixes` --- ### 📝 Commits (3) - [`a2b135b`](https://github.com/devgianlu/go-librespot/commit/a2b135b922d7161c08894af7513bb76c689cc09c) feat: use lockfile to avoid multiple go-librespot instances - [`857d768`](https://github.com/devgianlu/go-librespot/commit/857d768a6fcc061533a23dfbad3424d92bf1c96e) fix: use nice formatting in state.json - [`f7ebe58`](https://github.com/devgianlu/go-librespot/commit/f7ebe58b42f2f36420e084f4e10324ad3f239a9b) fix: make writeAppState atomic ### 📊 Changes **3 files changed** (+84 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `cmd/daemon/main.go` (+48 -5) 📝 `go.mod` (+9 -5) 📝 `go.sum` (+27 -17) </details> ### 📄 Description * Add locking so no two go-librespot processes can use the same configdir * Use indentation in state.json * Hopefully fix some atomicity issues when overwriting the state file See also the discussion in #103. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 14:26:15 +03:00
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#210
No description provided.