Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 392 for asSlice (0.18 sec)

  1. test/named.go

    	asMap(Map{})
    	isMap(Map{})
    
    	asSlice(slice)
    	isSlice(slice)
    	asSlice(make(Slice, 5))
    	isSlice(make(Slice, 5))
    	asSlice([]byte{1, 2, 3})
    	asSlice([]byte{1, 2, 3}[0:2])
    	asSlice(slice[0:4])
    	isSlice(slice[0:4])
    	asSlice(slice[3:8])
    	isSlice(slice[3:8])
    	asSlice(nil)
    	asSlice(Slice(nil))
    	isSlice(Slice(nil))
    	slice = nil
    	asSlice(Slice{1, 2, 3})
    	isSlice(Slice{1, 2, 3})
    	asSlice(Slice{})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 4.6K bytes
    - Viewed (0)
  2. src/net/netip/inlining_test.go

    		"uint128.not",
    		"uint128.or",
    		"uint128.subOne",
    		"uint128.xor",
    	}
    	switch runtime.GOARCH {
    	case "amd64", "arm64":
    		// These don't inline on 32-bit.
    		wantInlinable = append(wantInlinable,
    			"Addr.AsSlice",
    			"Addr.Next",
    			"Addr.Prev",
    		)
    	}
    
    	for _, want := range wantInlinable {
    		if !got[want] {
    			t.Errorf("%q is no longer inlinable", want)
    			continue
    		}
    		delete(got, want)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 17:10:01 UTC 2024
    - 2K bytes
    - Viewed (0)
  3. pilot/pkg/serviceregistry/kube/controller/ambient/services_test.go

    				{
    					Name:      "name",
    					Namespace: "ns",
    					Hostname:  "a.example.com",
    					Addresses: []*workloadapi.NetworkAddress{{
    						Network: testNW,
    						Address: netip.AddrFrom4([4]byte{1, 2, 3, 4}).AsSlice(),
    					}},
    					Ports: []*workloadapi.Port{{
    						ServicePort: 80,
    						TargetPort:  80,
    					}},
    					SubjectAltNames: []string{"san1"},
    				},
    				{
    					Name:      "name",
    					Namespace: "ns",
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jun 05 12:29:55 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  4. cni/pkg/ipset/nldeps_linux.go

    		Comment:  comment,
    		IP:       net.IP(ip.AsSlice()),
    		Protocol: &ipProto,
    		Replace:  replace,
    	})
    	if err != nil {
    		return fmt.Errorf("failed to add IP %s to ipset %s: %w", ip, name, err)
    	}
    	return nil
    }
    
    func (m *realDeps) deleteIP(name string, ip netip.Addr, ipProto uint8) error {
    	err := netlink.IpsetDel(name, &netlink.IPSetEntry{
    		IP:       net.IP(ip.AsSlice()),
    		Protocol: &ipProto,
    	})
    	if err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 30 18:07:05 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  5. pilot/pkg/serviceregistry/kube/controller/ambient/helpers.go

    		Network: a.Network(vip, make(labels.Instance, 0)).String(),
    		Address: ip.AsSlice(),
    	}, nil
    }
    
    func (a *index) toNetworkAddressFromIP(ip netip.Addr) *workloadapi.NetworkAddress {
    	return &workloadapi.NetworkAddress{
    		Network: a.Network(ip.String(), make(labels.Instance, 0)).String(),
    		Address: ip.AsSlice(),
    	}
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Mar 22 20:35:23 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  6. security/pkg/pki/util/san.go

    	ids := []Identity{}
    	for _, host := range strings.Split(hosts, ",") {
    		if ipa, _ := netip.ParseAddr(host); ipa.IsValid() {
    			// Use the 4-byte representation of the IP address when possible.
    			ip := ipa.AsSlice()
    			if ipa.Is4In6() {
    				eip := ipa.As4()
    				ip = eip[:]
    			}
    			ids = append(ids, Identity{Type: TypeIP, Value: ip})
    		} else if strings.HasPrefix(host, spiffe.URIPrefix) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Oct 14 06:50:22 UTC 2022
    - 6K bytes
    - Viewed (0)
  7. security/pkg/pki/util/san_test.go

    func TestBuildSubjectAltNameExtension(t *testing.T) {
    	uriIdentity := Identity{Type: TypeURI, Value: []byte("spiffe://test.domain.com/ns/default/sa/default")}
    	ipIdentity := Identity{Type: TypeIP, Value: netip.MustParseAddr("10.0.0.1").AsSlice()}
    	dnsIdentity := Identity{Type: TypeDNS, Value: []byte("test.domain.com")}
    
    	testCases := map[string]struct {
    		hosts       string
    		expectedExt *pkix.Extension
    	}{
    		"URI host": {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Feb 12 17:36:33 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  8. src/net/addrselect.go

    	if b4 := b.To4(); b4 != nil {
    		b = b4
    	}
    	aAsSlice := a.AsSlice()
    	if len(aAsSlice) != len(b) {
    		return 0
    	}
    	// If IPv6, only up to the prefix (first 64 bits)
    	if len(aAsSlice) > 8 {
    		aAsSlice = aAsSlice[:8]
    		b = b[:8]
    	}
    	for len(aAsSlice) > 0 {
    		if aAsSlice[0] == b[0] {
    			cpl += 8
    			aAsSlice = aAsSlice[1:]
    			b = b[1:]
    			continue
    		}
    		bits := 8
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 09 00:24:06 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apimachinery/pkg/runtime/splice.go

    */
    
    package runtime
    
    import (
    	"bytes"
    	"io"
    )
    
    // Splice is the interface that wraps the Splice method.
    //
    // Splice moves data from given slice without copying the underlying data for
    // efficiency purpose. Therefore, the caller should make sure the underlying
    // data is not changed later.
    type Splice interface {
    	Splice([]byte)
    	io.Writer
    	Reset()
    	Bytes() []byte
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jun 05 18:03:48 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  10. pkg/util/slice/slice.go

    // SortStrings sorts the specified string slice in place. It returns the same
    // slice that was provided in order to facilitate method chaining.
    func SortStrings(s []string) []string {
    	sort.Strings(s)
    	return s
    }
    
    // ContainsString checks if a given slice of strings contains the provided string.
    // If a modifier func is provided, it is called with the slice item before the comparation.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Aug 21 19:03:53 UTC 2019
    - 2.1K bytes
    - Viewed (0)
Back to top