Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 752 for marshal1 (0.28 sec)

  1. src/crypto/x509/x509.go

    //
    // The PolicyIdentifier and Policies fields are both used to marshal certificate
    // policy OIDs. By default, only the PolicyIdentifier is marshaled, but if the
    // GODEBUG setting "x509usepolicies" has the value "1", the Policies field will
    // be marshaled instead of the PolicyIdentifier field. The Policies field can
    // be used to marshal policy OIDs which have components that are larger than 31
    // bits.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 09:20:15 UTC 2024
    - 82K bytes
    - Viewed (0)
  2. src/html/template/js.go

    	"try":        true,
    	"typeof":     true,
    	"void":       true,
    }
    
    var jsonMarshalType = reflect.TypeFor[json.Marshaler]()
    
    // indirectToJSONMarshaler returns the value, after dereferencing as many times
    // as necessary to reach the base type (or nil) or an implementation of json.Marshal.
    func indirectToJSONMarshaler(a any) any {
    	// text/template now supports passing untyped nil as a func call
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  3. pkg/version/cobra.go

    						}
    					}
    				}
    			case "yaml":
    				if marshaled, err := yaml.Marshal(&version); err == nil {
    					_, _ = fmt.Fprintln(cmd.OutOrStdout(), string(marshaled))
    				}
    			case "json":
    				if marshaled, err := json.MarshalIndent(&version, "", "  "); err == nil {
    					_, _ = fmt.Fprintln(cmd.OutOrStdout(), string(marshaled))
    				}
    			}
    
    			return nil
    		},
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Aug 08 16:43:05 UTC 2023
    - 6.1K bytes
    - Viewed (0)
  4. src/hash/crc64/crc64_test.go

    			if h.Sum64() != h2.Sum64() {
    				t.Errorf("ECMA crc64(%s) = 0x%x != marshaled (0x%x)", g.in, h.Sum64(), h2.Sum64())
    			}
    		}
    	})
    }
    
    func TestMarshalTableMismatch(t *testing.T) {
    	h1 := New(MakeTable(ISO))
    	h2 := New(MakeTable(ECMA))
    
    	state1, err := h1.(encoding.BinaryMarshaler).MarshalBinary()
    	if err != nil {
    		t.Errorf("could not marshal: %v", err)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 25 06:32:12 UTC 2018
    - 9.9K bytes
    - Viewed (0)
  5. src/vendor/golang.org/x/net/route/address.go

    		case *Inet4Addr:
    			l, err := a.marshal(b)
    			if err != nil {
    				return 0, err
    			}
    			b = b[l:]
    			attrs |= 1 << uint(i)
    		case *Inet6Addr:
    			l, err := a.marshal(b)
    			if err != nil {
    				return 0, err
    			}
    			b = b[l:]
    			attrs |= 1 << uint(i)
    		case *DefaultAddr:
    			l, err := a.marshal(b)
    			if err != nil {
    				return 0, err
    			}
    			b = b[l:]
    			attrs |= 1 << uint(i)
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 9.9K bytes
    - Viewed (0)
  6. src/hash/crc32/crc32_test.go

    			if h.Sum32() != h2.Sum32() {
    				t.Errorf("Castagnoli(%s) = 0x%x != marshaled 0x%x", g.in, h.Sum32(), h2.Sum32())
    			}
    		}
    	})
    }
    
    func TestMarshalTableMismatch(t *testing.T) {
    	h1 := New(IEEETable)
    	h2 := New(MakeTable(Castagnoli))
    
    	state1, err := h1.(encoding.BinaryMarshaler).MarshalBinary()
    	if err != nil {
    		t.Errorf("could not marshal: %v", err)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 03 14:56:25 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  7. pkg/config/analysis/diag/message.go

    	return fmt.Sprintf("%v [%v]%s %s",
    		m.Type.Level(), m.Type.Code(), m.Origin(),
    		fmt.Sprintf(m.Type.Template(), m.Parameters...))
    }
    
    // MarshalJSON satisfies the Marshaler interface
    func (m *Message) MarshalJSON() ([]byte, error) {
    	return json.Marshal(m.Unstructured(true))
    }
    
    // NewMessageType returns a new MessageType instance.
    func NewMessageType(level Level, code, template string) *MessageType {
    	return &MessageType{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Nov 10 02:05:07 UTC 2022
    - 5.1K bytes
    - Viewed (0)
  8. src/log/slog/json_handler_test.go

    				)
    			}
    		})
    	}
    }
    
    func BenchmarkJSONEncoding(b *testing.B) {
    	value := 3.14
    	buf := buffer.New()
    	defer buf.Free()
    	b.Run("json.Marshal", func(b *testing.B) {
    		b.ReportAllocs()
    		for i := 0; i < b.N; i++ {
    			by, err := json.Marshal(value)
    			if err != nil {
    				b.Fatal(err)
    			}
    			buf.Write(by)
    			*buf = (*buf)[:0]
    		}
    	})
    	b.Run("Encoder.Encode", func(b *testing.B) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jul 11 17:06:26 UTC 2023
    - 6.5K bytes
    - Viewed (0)
  9. pkg/bootstrap/option/convert.go

    	}
    }
    
    func convertToJSON(v any) string {
    	if v == nil {
    		return ""
    	}
    	b, err := json.Marshal(v)
    	if err != nil {
    		log.Error(err.Error())
    		return ""
    	}
    	return string(b)
    }
    
    // marshalMetadata combines type metadata and untyped metadata and marshals to json
    // This allows passing arbitrary metadata to Envoy, while still supported typed metadata for known types
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 02 00:35:05 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  10. staging/src/k8s.io/api/networking/v1/generated.pb.go

    	0x48, 0x15, 0x00, 0x00,
    }
    
    func (m *HTTPIngressPath) Marshal() (dAtA []byte, err error) {
    	size := m.Size()
    	dAtA = make([]byte, size)
    	n, err := m.MarshalToSizedBuffer(dAtA[:size])
    	if err != nil {
    		return nil, err
    	}
    	return dAtA[:n], nil
    }
    
    func (m *HTTPIngressPath) MarshalTo(dAtA []byte) (int, error) {
    	size := m.Size()
    	return m.MarshalToSizedBuffer(dAtA[:size])
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 06:06:37 UTC 2024
    - 158.2K bytes
    - Viewed (0)
Back to top