Config name is a Viper concept used for searching a specific file
in various paths with various extensions.
Making it configurable is usually not a useful feature
as users mostly want to define a full or relative path
to a config file.
This change replaces config name with config file.
profiling is now available via the HTTP base URL /debug/pprof/
examples, use this URL to start and download a 30 seconds CPU profile:
/debug/pprof/profile?seconds=30
use this URL to profile used memory:
/debug/pprof/heap?gc=1
use this URL to profile allocated memory:
/debug/pprof/allocs?gc=1
Full docs here:
https://golang.org/pkg/net/http/pprof/
we try to remove the trailing double quote for user input such as this one
sftpgo.exe serve -c "C:\ProgramData\SFTPGO\"
the value for the -c flag is parsed as:
C:\ProgramData\SFTPGO"
this is what the user specified, but the user want this value:
C:\ProgramData\SFTPGO
so we try to remove the trailing double quote.
Please note that we cannot do anything for something like this:
-c "C:\ProgramData\SFTPGO\" -l "sftpgo.log"
in this case the -l flag will be ignored and the value for the c flag is:
C:\ProgramData\SFTPGO" -l sftpgo.log
and so probably it is invalid. This is definitely a bad user input
added the "initprovider" command to initialize the database structure.
If we change the database schema the required changes will be checked
at startup and automatically applyed.