Skip to content

Commit

Permalink
change proxy to satisfy both gofmt 1.3 and 1.4 gofmt
Browse files Browse the repository at this point in the history
gofmt -s from 1.4  does not like
	for _ = range BLAH
it wants
	for range BLAH

But gofmt from 1.3 dies:
	./pkg/proxy/config/config.go:265:6: expected operand, found 'range'
	./pkg/proxy/config/config.go:268:3: expected '{', found 'EOF'

So instead, rewrite the code to make them both happy
  • Loading branch information
eparis committed Feb 20, 2015
1 parent 9965604 commit e8acfe5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/proxy/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,8 @@ func (s *serviceStore) MergedState() interface{} {
// watchForUpdates invokes bcaster.Notify() with the latest version of an object
// when changes occur.
func watchForUpdates(bcaster *config.Broadcaster, accessor config.Accessor, updates <-chan struct{}) {
for range updates {
for true {
<-updates
bcaster.Notify(accessor.MergedState())
}
}

0 comments on commit e8acfe5

Please sign in to comment.