mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-25 10:18:59 +02:00
improve initialization flow
This commit is contained in:
@@ -23,10 +23,8 @@ type (
|
||||
Item struct {
|
||||
*ItemConfig
|
||||
|
||||
Alias string `json:"alias"` // proxy alias
|
||||
SourceType string `json:"source_type"`
|
||||
AltURL string `json:"alt_url"` // original proxy target
|
||||
Provider string `json:"provider"`
|
||||
Alias string `json:"alias"` // proxy alias
|
||||
Provider string `json:"provider"`
|
||||
|
||||
IsUnset bool `json:"-"`
|
||||
}
|
||||
|
||||
@@ -32,7 +32,9 @@ func InitOverridesConfig() {
|
||||
if err != nil {
|
||||
logging.Error().Err(err).Msg("failed to load homepage overrides config")
|
||||
} else {
|
||||
logging.Info().Msgf("homepage overrides config loaded, %d items", len(overrideConfigInstance.ItemOverrides))
|
||||
logging.Info().
|
||||
Int("count", len(overrideConfigInstance.ItemOverrides)).
|
||||
Msg("homepage overrides config loaded")
|
||||
}
|
||||
task.OnProgramExit("save_homepage_json_config", func() {
|
||||
if len(overrideConfigInstance.ItemOverrides) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user