Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestParseAddrPort (0.52 sec)

  1. src/net/netip/netip_pkg_test.go

    			}
    			if got := err.Error(); !strings.Contains(got, test.errstr) {
    				t.Errorf("error is missing substring %q: %s", test.errstr, got)
    			}
    		})
    	}
    }
    
    func TestParseAddrPort(t *testing.T) {
    	tests := []struct {
    		in      string
    		want    AddrPort
    		wantErr bool
    	}{
    		{in: "1.2.3.4:1234", want: AddrPort{mustIP("1.2.3.4"), 1234}},
    		{in: "1.1.1.1:123456", wantErr: true},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 02 15:37:19 UTC 2023
    - 9K bytes
    - Viewed (0)
Back to top