- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 66 for ptrval (0.12 sec)
-
src/flag/flag.go
ptrVal := reflect.ValueOf(p) if ptrVal.Kind() != reflect.Ptr { panic("variable value type must be a pointer") } defVal := reflect.ValueOf(val) if defVal.Kind() == reflect.Ptr { defVal = defVal.Elem() } if defVal.Type() != ptrVal.Type().Elem() { panic(fmt.Sprintf("default type does not match variable type: %v != %v", defVal.Type(), ptrVal.Type().Elem())) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 18:38:24 UTC 2024 - 39.7K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr_test.go
continue } if value.Type == String && test.output.StrVal != value.StrVal { t.Errorf("expected string value %q (%v), but got %q (%v)", test.output.StrVal, test.output, value.StrVal, value) } } } func TestMarshalCBOR(t *testing.T) { for _, tc := range []struct { in IntOrString want []byte
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 21:48:09 UTC 2024 - 14.3K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr.go
case String: isPercent := false s := intOrStr.StrVal if strings.HasSuffix(s, "%") { isPercent = true s = strings.TrimSuffix(intOrStr.StrVal, "%") } else { return 0, false, fmt.Errorf("invalid type: string is not a percentage") } v, err := strconv.Atoi(s) if err != nil { return 0, false, fmt.Errorf("invalid value %q: %v", intOrStr.StrVal, err) } return int(v), isPercent, nil }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 21:48:09 UTC 2024 - 7.8K bytes - Viewed (0) -
pkg/kube/apimirror/probe.go
) type IntOrString struct { Type Type IntVal int32 StrVal string } // UnmarshalJSON implements the json.Unmarshaller interface. func (intstr *IntOrString) UnmarshalJSON(value []byte) error { if value[0] == '"' { intstr.Type = String return json.Unmarshal(value, &intstr.StrVal) } intstr.Type = Int return json.Unmarshal(value, &intstr.IntVal) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu May 23 15:07:03 UTC 2024 - 4.4K bytes - Viewed (0) -
operator/pkg/apis/istio/v1alpha1/value_types_json.go
func (this *IntOrString) UnmarshalJSON(value []byte) error { 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 }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Sun Apr 21 17:42:54 UTC 2024 - 2.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/op_or_arg_name_mapper.cc
return ref; } absl::string_view OpOrArgNameMapper::GetUniqueNameView(OpOrVal op_or_val) { auto& name = op_or_val_to_name_[op_or_val]; if (!name.empty()) return name; // Update the value in the map with unique name. name = StringRefToView(GetUniqueName(GetName(op_or_val))); return name; } int OpOrArgNameMapper::InitOpName(OpOrVal op_or_val, llvm::StringRef name) { auto it = name_to_count_.try_emplace(name, 0);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.7K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/types/typeutil/map.go
// memo, but it would require detecting whether types are 'tainted' by // references to type parameters. memo: make(map[types.Type]uint32), // Re-using ptrMap ensures that pointer identity is preserved in this // hasher. ptrMap: h.ptrMap, sigTParams: tparams, } } for i := 0; i < tparams.Len(); i++ { tparam := tparams.At(i) hash += 7 * h.Hash(tparam.Constraint()) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 02:38:00 UTC 2024 - 13.9K bytes - Viewed (0) -
pkg/volume/iscsi/iscsi.go
// volumeName: pv0001 func (iscsi *iscsiDisk) GetPodDeviceMapPath() (string, string) { return iscsi.iscsiPodDeviceMapPath() } func portalMounter(portal string) string { if !strings.Contains(portal, ":") { portal = portal + ":3260" } return portal } // get iSCSI volume info: readOnly and fstype func getISCSIVolumeInfo(spec *volume.Spec) (bool, string, error) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 14 06:17:25 UTC 2024 - 23.4K bytes - Viewed (0) -
src/crypto/x509/oid.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 19:10:38 UTC 2024 - 8.3K bytes - Viewed (0) -
src/slices/iter_test.go
t.Errorf("SortedStableFunc wasn't stable on %d ints", n) } // iterVal converts a Seq2 to a Seq. iterVal := func(seq iter.Seq2[int, intPair]) iter.Seq[intPair] { return func(yield func(intPair) bool) { for _, v := range seq { if !yield(v) { return } } } } s = intPairs(SortedStableFunc(iterVal(Backward(data)), intPairCmp)) if !IsSortedFunc(s, intPairCmp) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 10 17:28:50 UTC 2024 - 5.7K bytes - Viewed (0)