Skip to content

v0.3.0

Latest

Choose a tag to compare

@3th1nk 3th1nk released this 10 Sep 09:31

πŸ†• New Features

  • SubNetting method enhancement : Added MethodSubnetMask for subnet division based on mask prefix length
  • Enhanced API : Added StartIP() and EndIP() methods for more granular IP range access
  • String() method : New method for string representation (CIDR() method remains unchanged)
  • EqualFold() method : Format-agnostic comparison method that ignores special format differences
  • IP increment/decrement : New IPIncr2 and IPDecr2 methods that don't modify input IP
  • Fine-grained IP type detection : New IsPureIPv6() method for precise IPv6 detection (excluding IPv4-mapped)

⚠️ Breaking Changes

  • Equal() method : Now compares both IP and mask (more strict comparison)
  • Mask() method : Return type changed from net.IP to net.IPMask
  • MaskSize() method : Removed from the API (use c.Mask().Size() instead)
  • Broadcast() method : Returns nil for pure IPv6 addresses (only valid for IPv4 and IPv4-mapped)

πŸ”§ Optimizations

  • Loop exit conditions optimization
  • Enhanced error handling
  • IPv4/IPv6 compatibility fixes
  • Code refactoring