Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 181 for unmarshalV1 (0.43 sec)

  1. cmd/xl-storage-format-v2-legacy.go

    package cmd
    
    import (
    	"fmt"
    	"time"
    
    	"github.com/tinylib/msgp/msgp"
    )
    
    // unmarshalV unmarshals with a specific header version.
    func (x *xlMetaV2VersionHeader) unmarshalV(v uint8, bts []byte) (o []byte, err error) {
    	switch v {
    	case 1:
    		return x.unmarshalV1(bts)
    	case 2:
    		x2 := xlMetaV2VersionHeaderV2{xlMetaV2VersionHeader: x}
    		return x2.UnmarshalMsg(bts)
    	case xlHeaderVersion:
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Apr 19 16:43:43 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unmarshal/unmarshal.go

    		}
    
    		// Classify the callee (without allocating memory).
    		argidx := -1
    
    		recv := fn.Type().(*types.Signature).Recv()
    		if fn.Name() == "Unmarshal" && recv == nil {
    			// "encoding/json".Unmarshal
    			// "encoding/xml".Unmarshal
    			// "encoding/asn1".Unmarshal
    			switch fn.Pkg().Path() {
    			case "encoding/json", "encoding/xml", "encoding/asn1":
    				argidx = 1 // func([]byte, interface{})
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  3. pkg/util/protomarshal/protomarshal.go

    	"istio.io/istio/pkg/log"
    )
    
    var (
    	unmarshaler       = jsonpb.Unmarshaler{AllowUnknownFields: true}
    	strictUnmarshaler = jsonpb.Unmarshaler{}
    )
    
    func Unmarshal(b []byte, m proto.Message) error {
    	return strictUnmarshaler.Unmarshal(bytes.NewReader(b), legacyproto.MessageV1(m))
    }
    
    func UnmarshalString(s string, m proto.Message) error {
    	return Unmarshal([]byte(s), m)
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Mar 12 10:02:09 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  4. cmd/batch-job-common-types.go

    type BatchJobKV struct {
    	line, col int
    	Key       string `yaml:"key" json:"key"`
    	Value     string `yaml:"value" json:"value"`
    }
    
    var _ yaml.Unmarshaler = &BatchJobKV{}
    
    // UnmarshalYAML - BatchJobKV extends default unmarshal to extract line, col information.
    func (kv *BatchJobKV) UnmarshalYAML(val *yaml.Node) error {
    	type jobKV BatchJobKV
    	var tmp jobKV
    	err := val.Decode(&tmp)
    	if err != nil {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Jun 11 03:13:30 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  5. src/crypto/elliptic/elliptic.go

    	x.FillBytes(compressed[1:])
    	return compressed
    }
    
    // unmarshaler is implemented by curves with their own constant-time Unmarshal.
    //
    // There isn't an equivalent interface for Marshal/MarshalCompressed because
    // that doesn't involve any mathematical operations, only FillBytes and Bit.
    type unmarshaler interface {
    	Unmarshal([]byte) (x, y *big.Int)
    	UnmarshalCompressed([]byte) (x, y *big.Int)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 9K bytes
    - Viewed (0)
  6. pkg/config/schema/ast/ast.go

    		if r.Group == group && r.Kind == kind {
    			return r
    		}
    	}
    	return nil
    }
    
    // UnmarshalJSON implements json.Unmarshaler
    func (m *Metadata) UnmarshalJSON(data []byte) error {
    	var in struct {
    		Resources []*Resource `json:"resources"`
    	}
    
    	if err := json.Unmarshal(data, &in); err != nil {
    		return err
    	}
    
    	m.Resources = in.Resources
    	seen := sets.New[string]()
    	// Process resources.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Mar 30 00:31:03 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/dispatcher_test.go

    			var p map[string]interface{}
    			if err := json.Unmarshal([]byte(actual), &p); err != nil {
    				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 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/direct/direct.go

    // types that implement cbor.Marshaler and cbor.Unmarshaler should use these functions.
    package direct
    
    import (
    	"k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes"
    )
    
    func Marshal(src interface{}) ([]byte, error) {
    	return modes.Encode.Marshal(src)
    }
    
    func Unmarshal(src []byte, dst interface{}) error {
    	return modes.Decode.Unmarshal(src, dst)
    }
    
    func Diagnose(src []byte) (string, error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 15 15:31:10 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  9. src/internal/fuzz/encoding_test.go

    		if b2 != b1 {
    			t.Fatalf("unmarshaled %v, want %v:\n%s", b2, b1, buf)
    		}
    	}
    }
    
    func TestInt8RoundTrip(t *testing.T) {
    	for x := -128; x < 128; x++ {
    		i1 := int8(x)
    		buf := marshalCorpusFile(i1)
    		vs, err := unmarshalCorpusFile(buf)
    		if err != nil {
    			t.Fatal(err)
    		}
    		i2 := vs[0].(int8)
    		if i2 != i1 {
    			t.Fatalf("unmarshaled %v, want %v:\n%s", i2, i1, buf)
    		}
    	}
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 00:20:34 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  10. operator/pkg/apis/istio/v1alpha1/value_types_json.go

    	if value[0] == '"' {
    		this.Type = int64(intstr.String)
    		var s string
    		err := json.Unmarshal(value, &s)
    		if err != nil {
    			return err
    		}
    		this.StrVal = &wrapperspb.StringValue{Value: s}
    		return nil
    	}
    	this.Type = int64(intstr.Int)
    	var s int32
    	err := json.Unmarshal(value, &s)
    	if err != nil {
    		return err
    	}
    	this.IntVal = &wrapperspb.Int32Value{Value: s}
    	return nil
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Apr 21 17:42:54 UTC 2024
    - 2.2K bytes
    - Viewed (0)
Back to top