Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 71 for parseBool (0.25 sec)

  1. staging/src/k8s.io/apimachinery/pkg/runtime/converter.go

    	DefaultUnstructuredConverter = &unstructuredConverter{
    		mismatchDetection: parseBool(os.Getenv("KUBE_PATCH_CONVERSION_DETECTOR")),
    		comparison: conversion.EqualitiesOrDie(
    			func(a, b time.Time) bool {
    				return a.UTC() == b.UTC()
    			},
    		),
    	}
    )
    
    func parseBool(key string) bool {
    	if len(key) == 0 {
    		return false
    	}
    	value, err := strconv.ParseBool(key)
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 11 16:02:13 UTC 2023
    - 24.9K bytes
    - Viewed (0)
  2. pkg/kube/inject/app_probe.go

    func ShouldRewriteAppHTTPProbers(annotations map[string]string, specSetting bool) bool {
    	if annotations != nil {
    		if value, ok := annotations[annotation.SidecarRewriteAppHTTPProbers.Name]; ok {
    			if isSetInAnnotation, err := strconv.ParseBool(value); err == nil {
    				return isSetInAnnotation
    			}
    		}
    	}
    	return specSetting
    }
    
    // FindSidecar returns the pointer to the first container whose name matches the "istio-proxy".
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Aug 04 15:06:24 UTC 2023
    - 8.4K bytes
    - Viewed (0)
  3. tools/docker-builder/types.go

    		builder = b
    	}
    
    	// TODO: consider automatically detecting Qemu support
    	qemu := false
    	if b, f := os.LookupEnv("ISTIO_DOCKER_QEMU"); f {
    		q, err := strconv.ParseBool(b)
    		if err == nil {
    			qemu = q
    		}
    	}
    
    	return Args{
    		Push:              false,
    		Save:              false,
    		NoCache:           false,
    		Hubs:              hub,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jul 26 13:23:41 UTC 2023
    - 9.9K bytes
    - Viewed (0)
  4. cmd/peer-rest-server.go

    	}
    
    	accessKey := mss.Get(peerRESTUser)
    	if accessKey == "" {
    		return np, grid.NewRemoteErr(errors.New("username is missing"))
    	}
    
    	temp, err := strconv.ParseBool(mss.Get(peerRESTUserTemp))
    	if err != nil {
    		return np, grid.NewRemoteErr(err)
    	}
    
    	userType := regUser
    	if temp {
    		userType = stsUser
    	}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 52.1K bytes
    - Viewed (0)
  5. src/strconv/atoi.go

    var ErrSyntax = errors.New("invalid syntax")
    
    // A NumError records a failed conversion.
    type NumError struct {
    	Func string // the failing function (ParseBool, ParseInt, ParseUint, ParseFloat, ParseComplex)
    	Num  string // the input
    	Err  error  // the reason the conversion failed (e.g. ErrRange, ErrSyntax, etc.)
    }
    
    func (e *NumError) Error() string {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun May 05 00:24:26 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  6. src/strconv/example_test.go

    }
    
    func ExampleItoa() {
    	i := 10
    	s := strconv.Itoa(i)
    	fmt.Printf("%T, %v\n", s, s)
    
    	// Output:
    	// string, 10
    }
    
    func ExampleParseBool() {
    	v := "true"
    	if s, err := strconv.ParseBool(v); err == nil {
    		fmt.Printf("%T, %v\n", s, s)
    	}
    
    	// Output:
    	// bool, true
    }
    
    func ExampleParseFloat() {
    	v := "3.1415926535"
    	if s, err := strconv.ParseFloat(v, 32); err == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 22:57:37 UTC 2023
    - 8.9K bytes
    - Viewed (0)
  7. pilot/pkg/security/authz/builder/builder.go

    }
    
    func (b Builder) isDryRun(policy model.AuthorizationPolicy) bool {
    	dryRun := false
    	if val, ok := policy.Annotations[annotation.IoIstioDryRun.Name]; ok {
    		var err error
    		dryRun, err = strconv.ParseBool(val)
    		if err != nil {
    			b.logger.AppendError(fmt.Errorf("failed to parse the value of %s: %v", annotation.IoIstioDryRun.Name, err))
    		}
    	}
    	return dryRun
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Nov 20 22:15:12 UTC 2023
    - 12.6K bytes
    - Viewed (0)
  8. src/cmd/vendor/github.com/google/pprof/internal/driver/config.go

    	}
    	if f.name == name {
    		return currentCfg.set(f, value)
    	}
    	// name must be one of the choices. If value is true, set field-value
    	// to name.
    	if v, err := strconv.ParseBool(value); v && err == nil {
    		return currentCfg.set(f, name)
    	}
    	return fmt.Errorf("unknown config field %q", name)
    }
    
    // resetTransient sets all transient fields in *cfg to their currently
    // configured values.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 16 15:19:53 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  9. migrator/migrator.go

    			case schema.Time:
    				if !strings.EqualFold(strings.TrimSuffix(dv, "()"), strings.TrimSuffix(field.DefaultValue, "()")) {
    					alterColumn = true
    				}
    			case schema.Bool:
    				v1, _ := strconv.ParseBool(dv)
    				v2, _ := strconv.ParseBool(field.DefaultValue)
    				alterColumn = v1 != v2
    			default:
    				alterColumn = dv != field.DefaultValue
    			}
    		}
    	}
    
    	// check comment
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Fri Apr 26 07:15:49 UTC 2024
    - 29K bytes
    - Viewed (0)
  10. src/encoding/asn1/asn1.go

    		if err1 == nil {
    			*v = parsedInt
    		}
    		err = err1
    		return
    	}
    	switch val := v; val.Kind() {
    	case reflect.Bool:
    		parsedBool, err1 := parseBool(innerBytes)
    		if err1 == nil {
    			val.SetBool(parsedBool)
    		}
    		err = err1
    		return
    	case reflect.Int, reflect.Int32, reflect.Int64:
    		if val.Type().Size() == 4 {
    			parsedInt, err1 := parseInt32(innerBytes)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:04:28 UTC 2023
    - 31.8K bytes
    - Viewed (0)
Back to top