package main

import (
	"encoding/json"
	"io/ioutil"
)

func LoadConfig(path string) ([]byte, error) {
	return ioutil.ReadFile(path)
}

func SaveConfig(path string, config map[string]interface{}) error {
	data, err := json.MarshalIndent(config, "", "  ")
	if err != nil {
		return err
	}
	return ioutil.WriteFile(path, data, 0644)
}
