Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 699 for unmarshalV1 (0.3 sec)

  1. src/net/netip/netip_test.go

    		}
    	}
    
    	// Cannot unmarshal from unexpected lengths.
    	for _, n := range []int{3, 6} {
    		var prefix2 Prefix
    		if err := prefix2.UnmarshalBinary(bytes.Repeat([]byte{1}, n)); err == nil {
    			t.Fatalf("unmarshaled from unexpected length %d", n)
    		}
    	}
    }
    
    func TestAddrMarshalUnmarshal(t *testing.T) {
    	// This only tests the cases where Marshal/Unmarshal diverges from
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 17:10:01 UTC 2024
    - 54.3K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/runtime/converter.go

    			marshalled, err := json.Marshal(sv.Interface())
    			if err != nil {
    				return fmt.Errorf("error encoding %s to json: %v", st, err)
    			}
    			// TODO: Is this Unmarshal needed?
    			var data []byte
    			err = json.Unmarshal(marshalled, &data)
    			if err != nil {
    				return fmt.Errorf("error decoding from json: %v", err)
    			}
    			dv.SetBytes(data)
    		} else {
    			dv.Set(reflect.MakeSlice(dt, 0, 0))
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 11 16:02:13 UTC 2023
    - 24.9K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unmarshal/doc.go

    // license that can be found in the LICENSE file.
    
    // The unmarshal package defines an Analyzer that checks for passing
    // non-pointer or non-interface types to unmarshal and decode functions.
    //
    // # Analyzer unmarshal
    //
    // unmarshal: report passing non-pointer or non-interface values to unmarshal
    //
    // The unmarshal analysis reports calls to functions such as json.Unmarshal
    // in which the argument type is not a pointer or an interface.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 09 01:28:01 UTC 2023
    - 571 bytes
    - Viewed (0)
  4. operator/pkg/tpath/tree.go

    			nv := make(map[string]any)
    			if err := json.Unmarshal([]byte(vv.(string)), &nv); err == nil {
    				// treat JSON as string
    				return vv, false
    			}
    			if err := yaml2.Unmarshal([]byte(vv.(string)), &nv); err == nil {
    				return nv, true
    			}
    		}
    	}
    	// looks like a literal or failed unmarshal, return original type.
    	return vv, false
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 17.5K bytes
    - Viewed (0)
  5. src/encoding/json/encode_test.go

    		t.Fatalf("Marshal:\n\tgot:  %s\n\twant: %s", got, want)
    	}
    	var back stringPointer
    	switch err = Unmarshal(b, &back); {
    	case err != nil:
    		t.Fatalf("Unmarshal error: %v", err)
    	case back.N == nil:
    		t.Fatalf("Unmarshal: back.N = nil, want non-nil")
    	case *back.N != 42:
    		t.Fatalf("Unmarshal: *back.N = %d, want 42", *back.N)
    	}
    }
    
    var encodeStringTests = []struct {
    	in  string
    	out string
    }{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 29.4K bytes
    - Viewed (0)
  6. pkg/istio-agent/xds_proxy_delta_test.go

    	}
    	gotEcdsConfig := &core.TypedExtensionConfig{}
    	if err := gotResp.Resources[0].Resource.UnmarshalTo(gotEcdsConfig); err != nil {
    		t.Fatalf("wasm config conversion output %v failed to unmarshal", gotResp.Resources[0])
    	}
    	assert.Equal(t, gotResp.Resources[0].Name, "extension-config")
    	wasm := &wasm.Wasm{
    		Config: &wasmv3.PluginConfig{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Mar 30 04:48:02 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  7. src/encoding/json/bench_test.go

    		var f float64
    		for pb.Next() {
    			if err := Unmarshal(data, &f); err != nil {
    				b.Fatalf("Unmarshal error: %v", err)
    			}
    		}
    	})
    }
    
    func BenchmarkUnmarshalInt64(b *testing.B) {
    	b.ReportAllocs()
    	data := []byte(`3`)
    	b.RunParallel(func(pb *testing.PB) {
    		var x int64
    		for pb.Next() {
    			if err := Unmarshal(data, &x); err != nil {
    				b.Fatalf("Unmarshal error: %v", err)
    			}
    		}
    	})
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 15:00:17 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  8. cni/pkg/log/uds.go

    	var raw map[string]json.RawMessage
    	if err := json.Unmarshal([]byte(l), &raw); err != nil {
    		log.Debugf("Failed to unmarshal CNI plugin log entry: %v", err)
    		return cniLog{}, false
    	}
    	var msg cniLog
    	if err := json.Unmarshal(raw["msg"], &msg.Msg); err != nil {
    		log.Debugf("Failed to unmarshal CNI plugin log entry: %v", err)
    		return cniLog{}, false
    	}
    	if err := json.Unmarshal(raw["level"], &msg.Level); err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jun 12 16:26:28 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  9. maven-core/src/main/java/org/apache/maven/configuration/BeanConfigurationRequest.java

         */
        BeanConfigurationRequest setBean(Object bean);
    
        /**
         * Gets the configuration to unmarshal into the bean.
         *
         * @return The configuration to unmarshal into the bean or {@code null} if none.
         */
        Object getConfiguration();
    
        /**
         * Sets the configuration to unmarshal into the bean. The configuration should be taken from
    Registered: Wed Jun 12 09:55:16 UTC 2024
    - Last Modified: Wed Sep 06 08:39:32 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  10. src/crypto/elliptic/elliptic_test.go

    		t.Errorf("IsOnCurve(∞) == true")
    	}
    
    	if xx, yy := Unmarshal(curve, Marshal(curve, x0, y0)); xx != nil || yy != nil {
    		t.Errorf("Unmarshal(Marshal(∞)) did not return an error")
    	}
    	// We don't test UnmarshalCompressed(MarshalCompressed(∞)) because there are
    	// two valid points with x = 0.
    	if xx, yy := Unmarshal(curve, []byte{0x00}); xx != nil || yy != nil {
    		t.Errorf("Unmarshal(∞) did not return an error")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 27 02:00:03 UTC 2023
    - 11.6K bytes
    - Viewed (0)
Back to top