Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for marshaled (0.38 sec)

  1. src/math/big/floatmarsh.go

    const floatGobVersion byte = 1
    
    // GobEncode implements the [encoding/gob.GobEncoder] interface.
    // The [Float] value and all its attributes (precision,
    // rounding mode, accuracy) are marshaled.
    func (x *Float) GobEncode() ([]byte, error) {
    	if x == nil {
    		return nil, nil
    	}
    
    	// determine max. space (bytes) required for encoding
    	sz := 1 + 1 + 4 // version + mode|acc|form|neg (3+2+2+1bit) + prec
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:31:58 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  2. pilot/pkg/xds/xdsgen.go

    			util.ByteCount(ResourceSize(res)), info, debug)
    	}
    
    	return nil
    }
    
    func ResourceSize(r model.Resources) int {
    	// Approximate size by looking at the Any marshaled size. This avoids high cost
    	// proto.Size, at the expense of slightly under counting.
    	size := 0
    	for _, r := range r {
    		size += len(r.Resource.Value)
    	}
    	return size
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon May 13 20:55:20 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  3. src/html/template/doc.go

    in the escaped template
    
    	<script>var pair = {{.}};</script>
    
    then the template output is
    
    	<script>var pair = {"A": "foo", "B": "bar"};</script>
    
    See package json to understand how non-string content is marshaled for
    embedding in JavaScript contexts.
    
    # Typed Strings
    
    By default, this package assumes that all pipelines produce a plain text string.
    It adds escaping pipeline stages necessary to correctly and safely embed that
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 18:04:29 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go

    }
    
    // MarshalJSON implements the json.Marshaler interface.
    func (t MicroTime) MarshalJSON() ([]byte, error) {
    	if t.IsZero() {
    		// Encode unset/nil objects as JSON's "null".
    		return []byte("null"), nil
    	}
    
    	return json.Marshal(t.UTC().Format(RFC3339Micro))
    }
    
    func (t MicroTime) MarshalCBOR() ([]byte, error) {
    	if t.IsZero() {
    		return cbor.Marshal(nil)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/time.go

    	buf = t.UTC().AppendFormat(buf, time.RFC3339)
    	buf = append(buf, '"')
    	return buf, nil
    }
    
    func (t Time) MarshalCBOR() ([]byte, error) {
    	if t.IsZero() {
    		return cbor.Marshal(nil)
    	}
    
    	return cbor.Marshal(t.UTC().Format(time.RFC3339))
    }
    
    // ToUnstructured implements the value.UnstructuredConverter interface.
    func (t Time) ToUnstructured() interface{} {
    	if t.IsZero() {
    		return nil
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:09 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/dispatcher_test.go

    				t.Errorf("unexpected error unmarshaling patch annotation: %v", err)
    			}
    			if p["configuration"] != tc.config {
    				t.Errorf("unmarshaled configuration doesn't match, want: %s, got: %v", tc.config, p["configuration"])
    			}
    			if p["webhook"] != tc.webhook {
    				t.Errorf("unmarshaled webhook doesn't match, want: %s, got: %v", tc.webhook, p["webhook"])
    			}
    			var expectedPatch interface{}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr.go

    		return i
    	}
    	return int(intstr.IntVal)
    }
    
    // MarshalJSON implements the json.Marshaller interface.
    func (intstr IntOrString) MarshalJSON() ([]byte, error) {
    	switch intstr.Type {
    	case Int:
    		return json.Marshal(intstr.IntVal)
    	case String:
    		return json.Marshal(intstr.StrVal)
    	default:
    		return []byte{}, fmt.Errorf("impossible IntOrString.Type")
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:09 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/time_test.go

    	}
    
    	for _, c := range cases {
    		input := TimeHolder{c.input}
    		result, err := yaml.Marshal(&input)
    		if err != nil {
    			t.Errorf("Failed to marshal input: '%v': %v", input, err)
    		}
    		if string(result) != c.result {
    			t.Errorf("Failed to marshal input: '%v': expected %+v, got %q", input, c.result, string(result))
    		}
    	}
    }
    
    func TestTimeUnmarshalYAML(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:09 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  9. pkg/kube/apimirror/probe.go

    	}
    	intstr.Type = Int
    	return json.Unmarshal(value, &intstr.IntVal)
    }
    
    // MarshalJSON implements the json.Marshaller interface.
    func (intstr IntOrString) MarshalJSON() ([]byte, error) {
    	switch intstr.Type {
    	case Int:
    		return json.Marshal(intstr.IntVal)
    	case String:
    		return json.Marshal(intstr.StrVal)
    	default:
    		return []byte{}, fmt.Errorf("impossible IntOrString.Type")
    	}
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 15:07:03 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  10. src/internal/chacha8rand/chacha8.go

    				break
    			}
    			s.Refill()
    		}
    	}
    	s.Init64(seed)
    }
    
    // Marshal marshals the state into a byte slice.
    // Marshal and Unmarshal are functions, not methods,
    // so that they will not be linked into the runtime
    // when it uses the State struct, since the runtime
    // does not need these.
    func Marshal(s *State) []byte {
    	data := make([]byte, 6*8)
    	copy(data, "chacha8:")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:47:29 UTC 2024
    - 4.4K bytes
    - Viewed (0)
Back to top