5376b9e271
* 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 |
||
---|---|---|
.. | ||
api_handler.go | ||
database_dump_handler.go | ||
faq_handler.go | ||
home_handler.go | ||
init.go | ||
modpanel.go | ||
not_found_handler.go | ||
publicSettingsHandler.go | ||
router.go | ||
rss_handler.go | ||
search_handler.go | ||
template.go | ||
template_functions.go | ||
template_test.go | ||
template_variables.go | ||
torrent_report_handler.go | ||
upload.go | ||
upload_handler.go | ||
user_handler.go | ||
view_torrent_handler.go | ||
wrap_handler.go |