* New config files
As decided, config files are parsed at runtime.
I decided to go for YAML config files because there can be comments in
it.
There are 2 files:
* config/default_config.yml <= which shouldn't be edited unless we add a
config parameter
* config/config.yml <= which is the user-defined config. This file
shouldn't be commited
Changed every call to config.XXX to config.Conf.XXX (look to the new
stucture of config in config/types.go)
Of course, putting config parameters in config.yml overrides config in
config_default.yml. You don't have to put everything in it, just add
what you want to override.
* Fixing test
Replacing conf.New by config.Conf
* Fixing call to config.Conf to config.Config{} in test files
* Might have fixed testing with this
Printf instead of Fatalf
* Renaming config.yml in example file
* Forbid commiting config.yml
* Should be now fixed
* Do not need this file anymore
This allows users to change the default logging verbosity (errors)
to either *detailed* (prints SQL statements) or *silent*.
Also added support for using a custom logger function.
- Fixed the gorm unit test that checks the automigrations
They will actually fail if any errors were logged now.
- Added a postgres unit test
Currently disabled because it would need a running local
postgres db and a change to the .travis.yml file to work
inside the CI build.
- The db test will run an sqlite3 database in in-memory
mode and run the automigrations.
- The template test will check if all the templates
that are stored in package variables (template.Must)
compile and if ReloadTemplates works without panicking.