1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-05-11 05:55:29 +00:00

Merge setting.InitXXX into one function with options (#24389)

This PR will merge 3 Init functions on setting packages as 1 and
introduce an options struct.
This commit is contained in:
Lunny Xiao
2023-05-04 11:55:35 +08:00
committed by GitHub
parent a2fe68e50b
commit 377a0a20f0
28 changed files with 104 additions and 137 deletions

View File

@ -106,8 +106,9 @@ func initEmbeddedExtractor(c *cli.Context) error {
log.DelNamedLogger(log.DEFAULT)
// Read configuration file
setting.InitProviderAllowEmpty()
setting.LoadCommonSettings()
setting.Init(&setting.Options{
AllowEmpty: true,
})
patterns, err := compileCollectPatterns(c.Args())
if err != nil {