settings: Save future changes in a dedicated file
This commit is contained in:
parent
465a48c1c0
commit
3c237819c3
5 changed files with 295 additions and 15 deletions
|
@ -103,7 +103,7 @@ func ReadSettings(path string) (*Settings, error) {
|
|||
}
|
||||
|
||||
// SaveSettings saves settings at the given location.
|
||||
func SaveSettings(path string, s *Settings) error {
|
||||
func SaveSettings(path string, s interface{}) error {
|
||||
if fd, err := os.Create(path); err != nil {
|
||||
return err
|
||||
} else {
|
||||
|
|
Reference in a new issue