gitea/cmd
Lunny Xiao c53ad052d8
Refactor the setting to make unit test easier ()
Some bugs caused by less unit tests in fundamental packages. This PR
refactor `setting` package so that create a unit test will be easier
than before.

- All `LoadFromXXX` files has been splited as two functions, one is
`InitProviderFromXXX` and `LoadCommonSettings`. The first functions will
only include the code to create or new a ini file. The second function
will load common settings.
- It also renames all functions in setting from `newXXXService` to
`loadXXXSetting` or `loadXXXFrom` to make the function name less
confusing.
- Move `XORMLog` to `SQLLog` because it's a better name for that.

Maybe we should finally move these `loadXXXSetting` into the `XXXInit`
function? Any idea?

---------

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: delvh <dev.lh@web.de>
..
admin.go Add command to bulk set must-change-password ()
admin_auth_ldap.go Implement FSFE REUSE for golang files ()
admin_auth_ldap_test.go Implement FSFE REUSE for golang files ()
admin_user.go Add command to bulk set must-change-password ()
admin_user_change_password.go Provide the ability to set password hash algorithm parameters ()
admin_user_create.go Provide the ability to set password hash algorithm parameters ()
admin_user_delete.go Add context cache as a request level cache ()
admin_user_generate_access_token.go Add command to bulk set must-change-password ()
admin_user_list.go Add command to bulk set must-change-password ()
admin_user_must_change_password.go Add command to bulk set must-change-password ()
cert.go Implement FSFE REUSE for golang files ()
cmd.go Refactor the setting to make unit test easier ()
convert.go Refactor the setting to make unit test easier ()
docs.go Implement FSFE REUSE for golang files ()
doctor.go Refactor the setting to make unit test easier ()
dump.go Refactor the setting to make unit test easier ()
dump_repo.go Refactor the setting to make unit test easier ()
embedded.go Refactor the setting to make unit test easier ()
embedded_stub.go Implement FSFE REUSE for golang files ()
generate.go Implement FSFE REUSE for golang files ()
hook.go Implement actions ()
hook_test.go Implement FSFE REUSE for golang files ()
keys.go Implement FSFE REUSE for golang files ()
mailer.go Refactor the setting to make unit test easier ()
main_test.go Refactor the setting to make unit test easier ()
manager.go Implement FSFE REUSE for golang files ()
manager_logging.go Implement FSFE REUSE for golang files ()
migrate.go Refactor the setting to make unit test easier ()
migrate_storage.go Refactor the setting to make unit test easier ()
migrate_storage_test.go Implement FSFE REUSE for golang files ()
restore_repo.go Refactor the setting to make unit test easier ()
serv.go Refactor the setting to make unit test easier ()
web.go Refactor the setting to make unit test easier ()
web_acme.go Implement FSFE REUSE for golang files ()
web_graceful.go Implement FSFE REUSE for golang files ()
web_https.go Implement FSFE REUSE for golang files ()