Partial default values
This commit is contained in:
parent
95557a8dba
commit
388a7f6ab5
3 changed files with 27 additions and 0 deletions
8
file.go
8
file.go
|
@ -13,6 +13,14 @@ type FileProvider struct {
|
|||
Filename string
|
||||
}
|
||||
|
||||
func NewFileProvider() *FileProvider {
|
||||
fileProvider := new(FileProvider)
|
||||
// default values
|
||||
fileProvider.Watch = true
|
||||
|
||||
return fileProvider
|
||||
}
|
||||
|
||||
func (provider *FileProvider) Provide(configurationChan chan<- *Configuration){
|
||||
watcher, err := fsnotify.NewWatcher()
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue