4
0
Fork 0
planet/patches/1.patch

36 γραμμές
1,2 KiB
Diff

2024-08-03 20:11:09 +03:00
diff --git a/internal/config.go b/internal/config.go
index 60b6a33..540e0d9 100644
--- a/internal/config.go
+++ b/internal/config.go
@@ -21,7 +21,7 @@ type Config struct {
FeedID string `toml:"feed_id"`
Cache string `toml:"cache"`
Timeout utils.Duration `toml:"timeout"`
- themePath string `toml:"theme"`
+ ThemePath string `toml:"theme"`
Theme fs.FS `toml:"-"`
Output string `toml:"output"`
Feeds []manifest.Feed `toml:"feed"`
@@ -33,7 +33,7 @@ type Config struct {
func (c *Config) Load(path string) error {
c.Name = "Planet"
c.Cache = "./cache"
- c.themePath = ""
+ c.ThemePath = ""
c.Output = "./output"
c.ItemsPerPage = 10
c.MaxPages = 5
@@ -48,10 +48,10 @@ func (c *Config) Load(path string) error {
}
c.Cache = filepath.Join(configDir, c.Cache)
- if c.themePath == "" {
+ if c.ThemePath == "" {
c.Theme = dflt.Theme
} else {
- themePath := filepath.Join(configDir, c.themePath)
+ themePath := filepath.Join(configDir, c.ThemePath)
if _, err := os.Stat(themePath); os.IsNotExist(err) {
return fmt.Errorf("theme %q not found: %w", themePath, err)
}