networkUtils

package
v0.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIpByNetworkInterface

func GetIpByNetworkInterface(networkInterface string) string

func RegexpIp

func RegexpIp(ip string) bool

RegexpIp

  • 0-9 一位数,只有个位,取值是0~9 \d
  • 10-99 两位数,十位取值1-9,个位取值是0~9 [1-9]\d
  • 100-199 三位数,最高位取值为1,十位取值0-9,个位取值0-9 1\d{2}
  • 200-249 三位数,最高位取值为2,十位取值0-4,个位取值0-9 2[0-4]\d
  • 250-255 三位数,最高位取值为2,十位取值5,个位取值0-5 25[0-5]
  • xxx.xxx.xxx.xxx
  • ^((25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))\.){3}(25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))$

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL