settings: admin interface see default params
This commit is contained in:
parent
ef4a738672
commit
b1c4ebfe45
2 changed files with 12 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Reference in a new issue