Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for KindString (0.19 sec)

  1. src/log/slog/value.go

    // The zero Value corresponds to nil.
    type Value struct {
    	_ [0]func() // disallow ==
    	// num holds the value for Kinds Int64, Uint64, Float64, Bool and Duration,
    	// the string length for KindString, and nanoseconds since the epoch for KindTime.
    	num uint64
    	// If any is of type Kind, then the value is in num as described above.
    	// If any is of type *time.Location, then the Kind is Time and time.Time value
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 16:12:08 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  2. src/log/slog/text_handler.go

    // io.Writer.Write.
    func (h *TextHandler) Handle(_ context.Context, r Record) error {
    	return h.commonHandler.handle(r)
    }
    
    func appendTextValue(s *handleState, v Value) error {
    	switch v.Kind() {
    	case KindString:
    		s.appendString(v.str())
    	case KindTime:
    		s.appendTime(v.time())
    	case KindAny:
    		if tm, ok := v.any.(encoding.TextMarshaler); ok {
    			data, err := tm.MarshalText()
    			if err != nil {
    				return err
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 23 22:56:07 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  3. src/log/slog/json_handler.go

    	}
    	s.buf.WriteByte('"')
    	*s.buf = t.AppendFormat(*s.buf, time.RFC3339Nano)
    	s.buf.WriteByte('"')
    }
    
    func appendJSONValue(s *handleState, v Value) error {
    	switch v.Kind() {
    	case KindString:
    		s.appendString(v.str())
    	case KindInt64:
    		*s.buf = strconv.AppendInt(*s.buf, v.Int64(), 10)
    	case KindUint64:
    		*s.buf = strconv.AppendUint(*s.buf, v.Uint64(), 10)
    	case KindFloat64:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 16:18:11 UTC 2023
    - 8.1K bytes
    - Viewed (0)
  4. src/go/types/expr.go

    	case *Slice, *Signature, *Map:
    		return check.kindString(typ) + " can only be compared to nil"
    	}
    	// see if we can extract a more specific error
    	var cause string
    	comparable(typ, true, nil, func(format string, args ...interface{}) {
    		cause = check.sprintf(format, args...)
    	})
    	return cause
    }
    
    // kindString returns the type kind as a string.
    func (check *Checker) kindString(typ Type) string {
    	switch under(typ).(type) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 49.7K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/types2/expr.go

    	case *Slice, *Signature, *Map:
    		return check.kindString(typ) + " can only be compared to nil"
    	}
    	// see if we can extract a more specific error
    	var cause string
    	comparable(typ, true, nil, func(format string, args ...interface{}) {
    		cause = check.sprintf(format, args...)
    	})
    	return cause
    }
    
    // kindString returns the type kind as a string.
    func (check *Checker) kindString(typ Type) string {
    	switch under(typ).(type) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 51.7K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/cel/library/regex.go

    	if !ok {
    		return types.MaybeNoSuchOverloadErr(regexVal)
    	}
    	re, err := regexp.Compile(regex)
    	if err != nil {
    		return types.NewErr("Illegal regex: %v", err.Error())
    	}
    	result := re.FindString(str)
    	return types.String(result)
    }
    
    func findAll(args ...ref.Val) ref.Val {
    	argn := len(args)
    	if argn < 2 || argn > 3 {
    		return types.NoSuchOverloadErr()
    	}
    	str, ok := args[0].Value().(string)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Aug 23 21:31:27 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  7. src/cmd/go/internal/work/security.go

    		arg := list[i]
    		if disallow != nil && disallow.FindString(arg) == arg {
    			goto Bad
    		}
    		if allow != nil && allow.FindString(arg) == arg {
    			continue Args
    		}
    		for _, re := range invalid {
    			if re.FindString(arg) == arg { // must be complete match
    				goto Bad
    			}
    		}
    		for _, re := range valid {
    			if re.FindString(arg) == arg { // must be complete match
    				continue Args
    			}
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:47:34 UTC 2024
    - 10K bytes
    - Viewed (0)
  8. cmd/kube-controller-manager/app/controllermanager_test.go

    	for _, featureText := range utilfeature.DefaultFeatureGate.KnownFeatures() {
    		// we have to parse this from KnownFeatures, because usage of mutable FeatureGate is not allowed in unit tests
    		feature := featureGateRegex.FindString(featureText)
    		if strings.Contains(featureText, string(featuregate.Alpha)) && feature != "AllAlpha" {
    			alphaFeatures.Insert(feature)
    		}
    
    	}
    
    	for name, controller := range NewControllerDescriptors() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  9. src/regexp/exec_test.go

    	{"32M", 32 << 20},
    }
    
    func TestLongest(t *testing.T) {
    	re, err := Compile(`a(|b)`)
    	if err != nil {
    		t.Fatal(err)
    	}
    	if g, w := re.FindString("ab"), "a"; g != w {
    		t.Errorf("first match was %q, want %q", g, w)
    	}
    	re.Longest()
    	if g, w := re.FindString("ab"), "ab"; g != w {
    		t.Errorf("longest match was %q, want %q", g, w)
    	}
    }
    
    // TestProgramTooLongForBacktrack tests that a regex which is too long
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:36:03 UTC 2024
    - 20.7K bytes
    - Viewed (0)
  10. operator/pkg/validate/common.go

    )
    
    // validateWithRegex checks whether the given value matches the regexp r.
    func validateWithRegex(path util.Path, val any, r *regexp.Regexp) (errs util.Errors) {
    	valStr := fmt.Sprint(val)
    	if len(r.FindString(valStr)) != len(valStr) {
    		errs = util.AppendErr(errs, fmt.Errorf("invalid value %s: %v", path, val))
    		printError(errs.ToError())
    	}
    	return errs
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Aug 10 15:35:03 UTC 2023
    - 11K bytes
    - Viewed (0)
Back to top