hudl / fargo

Golang client for Netflix Eureka
MIT License
133 stars 53 forks source link

fix dns_discovery init() call breaks in windows #12

Closed jianfeiliao closed 10 years ago

jianfeiliao commented 10 years ago

https://github.com/hudl/fargo/blob/master/dns_discover.go#L75

This line gets executed when the fargo package are imported, and on a windows system, this file doesn't exist, and therefore breaks the application even if the application does not really use the dns discovery feature.

So I basically change the init() call to a normal function and propagate the error so it doesn't break on windows when the feature is not enabled.

cquinn commented 10 years ago

Hey Ryan,

Jianfei works with me at Riot and has made this fix in order to get fargo runnable on Windows. It would be nice at least if it could build and work, even if the dns feature didn't.

Could you take a look at it?