Closed aykevl closed 1 month ago
Its more useful to me the way it is for my application, is there a way we can have both? perhaps with a command line option?
@Willyarma yes, if there's a flag to set the config directory then you can set it to use the current working directory.
I already made a request in #80 for command line options. Its loosly related to this. I was thinking about creating the config file dynamically on the fly then realised if I launch all instances in parallel then that wont work. A command line path / filename for different config files would though.
Edit: Looks like it was already done, sorry I didnt realise.
@aykevl This sounds like a great idea, especially in tackling #81. I have recently refactored the configuration code to use koanf
so it's a little bit nicer, but this is even better.
Proposal is implemented in #103 so closing.
Right now, go-librespot reads configuration and credentials from the current working directory (unless specified otherwise). I propose we use the following scheme instead:
UserConfigDir() + "/go-librespot"
so it also uses the appropriate directory on other OSes.There are a few reasons why I think this is a good idea:
@devgianlu if you agree with this scheme I'd like to implement this (but asking here first before I put a lot of work into it).