feat: add configuration file handling

- add helper function to parse configuration from a YAML file
- update command-line parameters to include a config file option
- remove hardcoded Pomodoro settings and use parsed config instead
- delete obsolete PomodoroSettings.go file

🤖
This commit is contained in:
Sebastian Mark 2024-10-23 17:36:30 +02:00
parent 25e939f523
commit bb790459c1
7 changed files with 69 additions and 26 deletions

11
pkg/models/configfile.go Normal file
View file

@ -0,0 +1,11 @@
package models
import (
"git.smsvc.net/pomodoro/GoTomato/pkg/models"
)
type ConfigFile struct {
URL string `yaml:"url"`
Password string `yaml:"password"`
PomodoroConfig models.GoTomatoPomodoroConfig `yaml:"config"`
}