Default postgres DB password in config
I was building this project according to the INSTALL.md
file and as per the example config, deployed a Postgres Docker Container for the DB.
docker run --name postgres14 -p 5432:5432 -e POSTGRES_USER=crashdragon -e POSTGRES_PASSWORD=crashdragon -e POSTGRES_DB=crashdragon -d postgres:14-alpine
Initially when I was building it, it was failing and was unable to connect to DB.
If by anychace, the config is not present, the program writes and uses some default value as per the viper.SetDefault
function.
As per the default behavious, it only writes the viper.SetDefault("DB.Connection", "host=localhost user=crashdragon dbname=crashdragon sslmode=disable")
. Wouldnt it be better if also add password to this default value, like this viper.SetDefault("DB.Connection", "host=localhost user=crashdragon password=crashdragon dbname=crashdragon sslmode=disable")