Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for MarshalNext (4.62 sec)

  1. src/net/netip/fuzz_test.go

    			}
    
    			if ip.IsValid() && !ip.Is4In6() {
    				buf, err := ip.MarshalText()
    				if err != nil {
    					t.Fatal(err)
    				}
    				buf2, err := stdip.MarshalText()
    				if err != nil {
    					t.Fatal(err)
    				}
    				if !bytes.Equal(buf, buf2) {
    					t.Errorf("Addr.MarshalText() != net.IP.MarshalText(): ip=%q stdip=%q", ip, stdip)
    				}
    				if ip.String() != stdip.String() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 20 23:46:23 UTC 2021
    - 10.5K bytes
    - Viewed (0)
  2. src/crypto/x509/oid_test.go

    			continue
    		}
    
    		if !o2.Equal(tt.out) {
    			t.Errorf("ParseOID(%q) = %v; want = %v", tt.in, o2, tt.out)
    			continue
    		}
    
    		marshalled, err := o.MarshalText()
    		if string(marshalled) != tt.in || err != nil {
    			t.Errorf("(%#v).MarshalText() = (%v, %v); want = (%v, nil)", o, string(marshalled), err, tt.in)
    			continue
    		}
    
    		binary, err := o.MarshalBinary()
    		if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 19:10:38 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  3. api/go1.18.txt

    pkg net/netip, method (Addr) IsValid() bool
    pkg net/netip, method (Addr) Less(Addr) bool
    pkg net/netip, method (Addr) MarshalBinary() ([]uint8, error)
    pkg net/netip, method (Addr) MarshalText() ([]uint8, error)
    pkg net/netip, method (Addr) Next() Addr
    pkg net/netip, method (Addr) Prefix(int) (Prefix, error)
    pkg net/netip, method (Addr) Prev() Addr
    pkg net/netip, method (Addr) String() string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 17 20:31:46 UTC 2023
    - 13K bytes
    - Viewed (0)
  4. src/encoding/json/encode_test.go

    type RefText int
    
    func (*RefText) MarshalText() ([]byte, error) {
    	return []byte(`"ref"`), nil
    }
    
    func (r *RefText) UnmarshalText([]byte) error {
    	*r = 13
    	return nil
    }
    
    // ValText has Marshaler methods with value receiver.
    type ValText int
    
    func (ValText) MarshalText() ([]byte, error) {
    	return []byte(`"val"`), nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 29.4K bytes
    - Viewed (0)
  5. src/net/netip/netip.go

    		ret = append(ret, '%')
    		ret = append(ret, ip.Zone()...)
    	}
    	return string(ret)
    }
    
    // MarshalText implements the [encoding.TextMarshaler] interface,
    // The encoding is the same as returned by [Addr.String], with one exception:
    // If ip is the zero [Addr], the encoding is the empty string.
    func (ip Addr) MarshalText() ([]byte, error) {
    	switch ip.z {
    	case z0:
    		return []byte(""), nil
    	case z4:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 17:10:01 UTC 2024
    - 43.2K bytes
    - Viewed (0)
  6. src/encoding/xml/marshal.go

    		text, err := val.Interface().(encoding.TextMarshaler).MarshalText()
    		if err != nil {
    			return err
    		}
    		start.Attr = append(start.Attr, Attr{name, string(text)})
    		return nil
    	}
    
    	if val.CanAddr() {
    		pv := val.Addr()
    		if pv.CanInterface() && pv.Type().Implements(textMarshalerType) {
    			text, err := pv.Interface().(encoding.TextMarshaler).MarshalText()
    			if err != nil {
    				return err
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 18:46:41 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  7. src/encoding/json/encode.go

    		e.WriteString("null")
    		return
    	}
    	m, ok := v.Interface().(encoding.TextMarshaler)
    	if !ok {
    		e.WriteString("null")
    		return
    	}
    	b, err := m.MarshalText()
    	if err != nil {
    		e.error(&MarshalerError{v.Type(), err, "MarshalText"})
    	}
    	e.Write(appendString(e.AvailableBuffer(), b, opts.escapeHTML))
    }
    
    func addrTextMarshalerEncoder(e *encodeState, v reflect.Value, opts encOpts) {
    	va := v.Addr()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 36.2K bytes
    - Viewed (0)
  8. internal/config/storageclass/storage-class.go

    	if scStr == "" {
    		return nil
    	}
    	s, err := parseStorageClass(scStr)
    	if err != nil {
    		return err
    	}
    	sc.Parity = s.Parity
    	return nil
    }
    
    // MarshalText - marshals storage class string.
    func (sc *StorageClass) MarshalText() ([]byte, error) {
    	if sc.Parity != 0 {
    		return []byte(fmt.Sprintf("%s:%d", schemePrefix, sc.Parity)), nil
    	}
    	return []byte{}, nil
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  9. internal/kms/kms.go

    			return ErrPermission
    		}
    		return errKeyCreationFailed(err)
    	}
    	return nil
    }
    
    func (c *kmsConn) GenerateKey(ctx context.Context, req *GenerateKeyRequest) (DEK, error) {
    	aad, err := req.AssociatedData.MarshalText()
    	if err != nil {
    		return DEK{}, err
    	}
    
    	name := req.Name
    	if name == "" {
    		name = c.defaultKey
    	}
    
    	resp, err := c.client.GenerateKey(ctx, &kms.GenerateKeyRequest{
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue May 07 23:55:37 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/text/language/language.go

    }
    
    // String returns the canonical string representation of the language tag.
    func (t Tag) String() string {
    	return t.tag().String()
    }
    
    // MarshalText implements encoding.TextMarshaler.
    func (t Tag) MarshalText() (text []byte, err error) {
    	return t.tag().MarshalText()
    }
    
    // UnmarshalText implements encoding.TextUnmarshaler.
    func (t *Tag) UnmarshalText(text []byte) error {
    	var tag language.Tag
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 13:01:26 UTC 2024
    - 18.9K bytes
    - Viewed (0)
Back to top