2

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?

1 Answers1

1

You could try to sepcify a absolute path.

app --config path "$HOME/Documents/"
emptyhua
  • 6,634
  • 10
  • 11