settings: admin interface see default params

This commit is contained in:
nemunaire 2017-01-16 13:10:15 +01:00
parent ef4a738672
commit b1c4ebfe45
2 changed files with 12 additions and 1 deletions

View file

@ -26,6 +26,11 @@ type FICSettings struct {
EnableExerciceDepend bool `json:"enableExerciceDepend"`
}
func ExistsSettings(settingsPath string) bool {
_, err := os.Stat(settingsPath)
return !os.IsNotExist(err)
}
func ReadSettings(path string) (FICSettings, error) {
var s FICSettings
if fd, err := os.Open(path); err != nil {