I want the user of my CLI app to enter a specific path where they want to save files. I tried to use Cobra's --config flag but I don't know how to.
Example:
app --config path "~/Documents/"
How could I do this?
I want the user of my CLI app to enter a specific path where they want to save files. I tried to use Cobra's --config flag but I don't know how to.
Example:
app --config path "~/Documents/"
How could I do this?
You could try to sepcify a absolute path.
app --config path "$HOME/Documents/"