Skip to content

Commit e1872a6

Browse files
committed
remove unnecessary argument
1 parent bac6fca commit e1872a6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

service/watcher/reconfigure.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
// read the configuration file(s) from the repository, gather all the targets
2121
// and set up the target watcher. This should always happen in sync with the
2222
// rest of the service to prevent a reconfiguration during an event handler.
23-
func (w *Watcher) reconfigure(hostname string) (err error) {
23+
func (w *Watcher) reconfigure() (err error) {
2424
zap.L().Debug("reconfiguring")
2525

2626
err = w.watchConfig()
@@ -35,7 +35,7 @@ func (w *Watcher) reconfigure(hostname string) (err error) {
3535
}
3636
state := getNewState(
3737
filepath.Join(w.directory, path),
38-
hostname,
38+
w.hostname,
3939
w.state,
4040
)
4141

service/watcher/watcher.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ func New(
5252
}
5353

5454
func (w *Watcher) Start() error {
55-
if err := w.reconfigure(w.hostname); err != nil {
55+
if err := w.reconfigure(); err != nil {
5656
return err
5757
}
5858

5959
f := func() (err error) {
6060
select {
6161
case <-w.configWatcher.Events:
62-
err = w.reconfigure(w.hostname)
62+
err = w.reconfigure()
6363

6464
case event := <-w.targetsWatcher.Events:
6565
if e := w.handle(event); e != nil {

0 commit comments

Comments
 (0)