diff options
author | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2018-02-23 18:45:15 +0100 |
---|---|---|
committer | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2018-02-23 18:45:15 +0100 |
commit | 65e09e831cf13343ac713fbf15281174d1f13a94 (patch) | |
tree | 0176a263ecf6d1059a272007c6f450770f5792ca /lib/xdsserver/folders.go | |
parent | e97eebc18d726aa55738d7e19513491cf58a6e3a (diff) |
Added target and terminal support.v1.1.0
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'lib/xdsserver/folders.go')
-rw-r--r-- | lib/xdsserver/folders.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/xdsserver/folders.go b/lib/xdsserver/folders.go index fa24878..d27a329 100644 --- a/lib/xdsserver/folders.go +++ b/lib/xdsserver/folders.go @@ -51,8 +51,8 @@ type RegisteredCB struct { var fcMutex = sync.NewMutex() var ffMutex = sync.NewMutex() -// FoldersNew Create a new instance of Model Folders -func FoldersNew(ctx *Context) *Folders { +// FoldersConstructor Create a new instance of Model Folders +func FoldersConstructor(ctx *Context) *Folders { file, _ := xdsconfig.FoldersConfigFilenameGet() return &Folders{ Context: ctx, @@ -74,7 +74,9 @@ func (f *Folders) LoadConfig() error { f.Log.Infof("Use folder config file: %s", f.fileOnDisk) err := foldersConfigRead(f.fileOnDisk, &flds) if err != nil { - if strings.HasPrefix(err.Error(), "No folder config") { + if strings.HasPrefix(err.Error(), "EOF") { + f.Log.Warnf("Empty folder config file") + } else if strings.HasPrefix(err.Error(), "No folder config") { f.Log.Warnf(err.Error()) } else { return err |