Rename NameProvider to Name
Because golint is gonna cry at some point otherwise. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
parent
de0a57ec76
commit
cdade5f649
10 changed files with 50 additions and 50 deletions
|
@ -11,12 +11,12 @@ import (
|
|||
"gopkg.in/fsnotify.v1"
|
||||
)
|
||||
|
||||
type FileProvider struct {
|
||||
type File struct {
|
||||
Watch bool
|
||||
Filename string
|
||||
}
|
||||
|
||||
func (provider *FileProvider) Provide(configurationChan chan<- types.ConfigMessage) error {
|
||||
func (provider *File) Provide(configurationChan chan<- types.ConfigMessage) error {
|
||||
watcher, err := fsnotify.NewWatcher()
|
||||
if err != nil {
|
||||
log.Error("Error creating file watcher", err)
|
||||
|
@ -61,7 +61,7 @@ func (provider *FileProvider) Provide(configurationChan chan<- types.ConfigMessa
|
|||
return nil
|
||||
}
|
||||
|
||||
func (provider *FileProvider) LoadFileConfig(filename string) *types.Configuration {
|
||||
func (provider *File) LoadFileConfig(filename string) *types.Configuration {
|
||||
configuration := new(types.Configuration)
|
||||
if _, err := toml.DecodeFile(filename, configuration); err != nil {
|
||||
log.Error("Error reading file:", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue