networking - Golang - check if IP address is in a network -


given:

  • a network address a: (172.17.0.0/16)
  • and ip address host b: (172.17.0.2/16)

how can if b in a?

all addresses string variables in following form: [ip address in dot-decimal notation]/[subnet mask]. should try manipulating strings (initial thoughts). there different path?

here same question python: "how can check if ip in network in python". approach go: go/golang check ip address in range

the go net package includes following functions:

this should cover needs.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -