hudl / fargo

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

avoid chance of division by 0 panic #21

Closed eikenb closed 9 years ago

eikenb commented 9 years ago

Avoid the possibility of a division by 0 error by checking length and returning empty value when length is 0. Allows calling code to manage situation without adding complications.

ryansb commented 9 years ago

Oh, missed this PR. Is it alright if I close this in lieu of #22 (since it logs & exits instead of silently returning)?

eikenb commented 9 years ago

Yeah. I missed #22. log.Fatal() is fine with me. Thanks.