These are chat archives for BVNK/bank
These config keys are also used to load the certs in httpApi and other places. keeps the user from having to change them everywhere.
Moreover, I came into another issue. If a user moves the bank binary to another path, they will lose access to the certs and config.json. The same will happen with "go install”.
Also, for those of us forking your repo, we have it in a path like GOPATH/src/github.com/figassis/bank but the import path remains github.com/bvnk/bank/config.json, so using that for configPath gets us in trouble.
What I did was allow the user to set their import path as an optional flag “./bank [-p path]”. If they leave the flag out, it does not affect anything, but I had to replace code in main.go to use flag.Arg(0) instead of os.Args1. That allows us to get the arguments without flags.
So now we can do things like move the bank binary anywhere in the system and run ./bank -p import_path http
This works even if the user does not have go installed :-)