refactor: add string function to config struct to allow for extendable printing of future fields

This commit is contained in:
Slug-Boi
2025-08-18 13:24:42 +02:00
parent ab3f16be4a
commit 01c6581027
2 changed files with 8 additions and 3 deletions
+7
View File
@@ -33,6 +33,13 @@ type Config struct {
} `mapstructure:"settings"`
}
func (c *Config) String() string {
return fmt.Sprintf("Author File: %s\nStarting Scope: %s\nEditor: %s",
c.Settings.AuthorFile,
c.Settings.StartingScope,
c.Settings.Editor)
}
func init() {
configDir, err := os.UserConfigDir()
if err == nil {