mirror of
https://github.com/Slug-Boi/cocommit.git
synced 2026-05-13 20:55:47 +00:00
refactor: add string function to config struct to allow for extendable printing of future fields
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user