kobolog / gorb

IPVS on steroids – REST API, heartbeats, service discovery and more
GNU Lesser General Public License v3.0
812 stars 81 forks source link

Use standart net.IP.To4 to detect address family #2

Closed noxiouz closed 8 years ago

noxiouz commented 8 years ago

It's a common way to detect an address family

codecov-io commented 8 years ago

Current coverage is 97.36%

Merging #2 into master will decrease coverage by -0.05% as of dc42eca

@@            master      #2   diff @@
======================================
  Files           10      10       
  Stmts          155     152     -3
  Branches        26      25     -1
  Methods          0       0       
======================================
- Hit            151     148     -3
  Partial          1       1       
  Missed           3       3       

Review entire Coverage Diff as of dc42eca

Powered by Codecov. Updated on successful CI builds.

kobolog commented 8 years ago

The To4() is way too ugly even for such a fucking ugly language as Go – it works only by coincidence and has nothing to do with IPv4. So instead of using another ad-hoc mechanic from the language, I decided to implement such a function myself. At least when this bunch of demented idiots called "The Go Authors" will change something, it will explicitly break.

noxiouz commented 8 years ago

:D ок