Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ExampleIP_DefaultMask (0.22 sec)

  1. src/net/example_test.go

    	fmt.Println(net.ParseIP("192.0.2.1"))
    	fmt.Println(net.ParseIP("2001:db8::68"))
    	fmt.Println(net.ParseIP("192.0.2"))
    
    	// Output:
    	// 192.0.2.1
    	// 2001:db8::68
    	// <nil>
    }
    
    func ExampleIP_DefaultMask() {
    	ip := net.ParseIP("192.0.2.1")
    	fmt.Println(ip.DefaultMask())
    
    	// Output:
    	// ffffff00
    }
    
    func ExampleIP_Equal() {
    	ipv4DNS := net.ParseIP("8.8.8.8")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 13 16:36:59 UTC 2021
    - 8.5K bytes
    - Viewed (0)
Back to top